[Samba] samba howto: sticky bit on directories

Linda Walsh samba at tlinx.org
Fri Apr 1 13:17:15 MDT 2011


Daniel Müller wrote:
> On Mon, 28 Mar 2011 19:24:17 -0700, Linda Walsh <samba at tlinx.org> wrote:
>> Daniel MC<ller wrote:
>>> This is working with samba sernet newest release:
>>> This is setting the bit for the group even with msoffice-files
> correctly
>>>         directory mask=2770
>>>         force directory mode=2770
>>>         create mask = 2770
>>>         force create mode=2770
>>>         force security mode=2770
>>>         force directory security mode=2770
>>>
>> ----
>>     Unfortunately, I don't think the 'local linux' version allows the
>> setUID functionality to work on directories.
>>
>> 	SetGID and allowing the propagation of the GID _does_ work.
>>
>> I'd guess on the reasoning: on any linux I've run on, users can't give
>> away files to other users.   Allowing this 'bit' to work would
> effectively do the same thing.
> --------
>
> Hm!! but I do it on centos 5.5 , it is working
> 
----------

You do what?   You mean you, for example:

 mkdir ~/suid-test-dir
 chmod 777 ~/suid-test-dir
 sudo chown daemon.daemon ~/suid-test-dir
 sudo chmod u+s,g+s ~/suid-test-dir
 touch ~/suid-test-dir/file

Now what are the user and group set on the file?

I see the file's "user" still set to me (i.e. setuid on dir didn't work), 
though the files "group" is set to 'daemon' (i.e. setgid on dir does work).

You are saying that on centos, both the user and group of 'file' are
*both* set to 'daemon'?






More information about the samba mailing list