public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@freemail.ru>
To: "Michel Bardiaux" <MBardiaux@mediaxim.be>, cygwin@cygwin.com
Subject: Re: cygwin 1.7.13-1: can't execute shell scripts on samba share
Date: Tue, 24 Apr 2012 15:05:00 -0000	[thread overview]
Message-ID: <1677123640.20120424185952@mtu-net.ru> (raw)
In-Reply-To: <6BFA9AF2C7556E42AFF3F187ECAB07B802F9D0A1@bespdc01.mediaxim.local>

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@freemail.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

  reply	other threads:[~2012-04-24 15:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18 15:45 Len Giambrone
2012-04-18 17:49 ` Earnie Boyd
2012-04-18 19:45   ` Len Giambrone
2012-04-19  8:29     ` Michel Bardiaux
2012-04-20 17:44       ` Len Giambrone
2012-04-19 11:37     ` Earnie Boyd
2012-04-20 17:45       ` Len Giambrone
2012-04-23 11:02         ` Michel Bardiaux
2012-04-23 11:33           ` Earnie Boyd
2012-04-23 11:54           ` Corinna Vinschen
2012-04-23 12:26             ` Michel Bardiaux
2012-04-23 12:31               ` Corinna Vinschen
2012-04-23 12:44                 ` Michel Bardiaux
2012-04-23 12:29             ` Corinna Vinschen
2012-04-24 10:50           ` Andrey Repin
2012-04-24 12:15             ` Michel Bardiaux
2012-04-24 15:05               ` Andrey Repin [this message]
2012-04-24 15:20                 ` Michel Bardiaux
2012-04-24 17:20                   ` Andrey Repin
2012-04-26 14:18                     ` Michel Bardiaux
2012-04-26 18:50                       ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1677123640.20120424185952@mtu-net.ru \
    --to=anrdaemon@freemail.ru \
    --cc=MBardiaux@mediaxim.be \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).