[Samba] Samba permissions
Keith Warno
krjw at valaran.com
Fri Jul 29 16:13:34 GMT 2005
* <krjw at valaran.com> [29/07/2005 1205EDT]:
[...]
> However, your new directory *inherited* the setgid bit (effectively a
> bitwise OR); this is simply the behavior of setgid bits on directories.
> From the man page for the stat() system call (section 2):
>
> The set GID bit (S_ISGID) has several special uses: For a
> directory it indicates that BSD semantics is to be used for
> that directory: files created there inherit their group ID from
> the directory, not from the effective gid of the creating
> process, and directories created there will also get the S_ISGID
> bit set. For a file that does not have the group execution
> bit (S_IXGRP) set, it indicates mandatory file/record locking.
>
> So, for your case:
>
> (3770 & 0777) | 2000 = 2770
I hate replying to my own mails, but just to clarify it'd make more
sense to write the above like so:
0777|2000 = 2777 = new dir mode before 'directory mask' 3770 is applied
2777&3770 = 2770 = new dir mode after directory mask is applied
--
SA Valaran Corp
GPG: 0xEC705AE9
I put the sh in IT.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20050729/5fd7c23c/attachment.bin
More information about the samba
mailing list