delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/24/11:05:36

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=2.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,KHOP_THREADED,TW_RW,TW_WX,TW_XR
X-Spam-Check-By: sourceware.org
Date: Tue, 24 Apr 2012 18:59:52 +0400
From: Andrey Repin <anrdaemon AT freemail DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <1677123640.20120424185952@mtu-net.ru>
To: "Michel Bardiaux" <MBardiaux AT mediaxim DOT be>, cygwin AT cygwin DOT com
Subject: Re: cygwin 1.7.13-1: can't execute shell scripts on samba share
In-Reply-To: <6BFA9AF2C7556E42AFF3F187ECAB07B802F9D0A1@bespdc01.mediaxim.local>
References: <1E3D6F97-F938-420C-A5F7-C6446EC27F32 AT intersystems DOT com> <CA+sc5mkcWZZcskBqSCgKJqzTh1-CwbyF_Z83Bsox2zPMtk5v9A AT mail DOT gmail DOT com> <1883CD3D-75CE-4289-A5F9-317DE2ED7F28 AT intersystems DOT com> <CA+sc5m=E78GFTYnTaOgjLOs-99OupJs1TA3aE_-AjdgGYo5F1Q AT mail DOT gmail DOT com> <FEF31C20-5357-4D61-A272-CE75404C3A88 AT intersystems DOT com> <6BFA9AF2C7556E42AFF3F187ECAB07B802F9CFCB AT bespdc01 DOT mediaxim DOT local> <193376784 DOT 20120424144538 AT mtu-net DOT ru> <6BFA9AF2C7556E42AFF3F187ECAB07B802F9D0A1 AT bespdc01 DOT mediaxim DOT local>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Greetings, Michel Bardiaux!

>>> I have also tried the same as you did (len.sh on a samba share) and
>>> saw the same problem. Then I saw that the len.sh got a (cygwin *and* 
>>> linux) mode of -rwxrw-r-- *without* doing any chmod. Then I saw that 
>>> *every* file I create on the samba share, gets the same mode!
>>
>> testparm -s
>> please.

> Yes, this explains a lot - but not completely. The relevant lines being
> the create masks:

> 0744 for global, 0755 for homes (the relevant share in my case), 0022 as
> cygwin umask.

> I would expect files created on the cygwin side to have 0755 on the
> linux side (or possibly masked by global and/or umask). I do not see how
> I end up with 0764.

I can't tell much either, but take this as a note:
create mask = what bits can be set by client at creation time.
security mask = what bits can be edited afterward.
create mode = default bits to be set.
force mode = bits that will be enforced on resulting mask.

I'll leave a live example from one of my live servers:

[D]
        comment = Projects
        path = /home/.shares/d
        force group = DomainUsers
        read only = No
        create mask = 0775
        force create mode = 0664
        security mask = 0775
        force security mode = 0664
        directory mask = 0775
        force directory mode = 0775
        directory security mask = 0775
        force directory security mode = 0775

What this does is the following:
It makes sure that directories and files inside are owned by DomainUsers group.
It makes sure that group have at least read and write access to the files.
It makes sure that group and guests have listing and traverse rights on directories.

Another point of note: from my memory, samba fakes ACLs to represent
permissions. This may include many strange things.
For example, most of that ^^ directory content has 0777 perms, but when I
look from Cygwin, it coming out more granular.


--
WBR,
Andrey Repin (anrdaemon AT freemail DOT ru) 24.04.2012, <18:18>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019