[Samba] Force user

Susan McConnell susanm at jbpc.co.uk
Thu Jun 3 18:05:55 GMT 2004


Hello list

The Samba Howto Collection repeatedly asserts that by setting the sticky
bit on directories any files created in those directories will be created
with the owner set to that of the directory (for example, see
http://samba.mirror.ac.uk/samba/docs/man/howto/AccessControls.html#id2541262).

This has never worked for me. Files created inherit the group of the
directory, but not the owner. I have even followed, line for line, the
sequence on that page as follows:

# chmod 6775 /foodbar
$ ls -al /foodbar/..

You should see:

drwsrwsr-x  2 jack  engr    48 2003-02-04 09:55 foodbar

#

Now type:

$ su - jill
$ cd /foodbar
$ touch Afile
$ ls -al

You should see that the file Afile created by Jill will have ownership and
permissions of Jack, as follows:

-rw-r--r--  1 jack  engr     0 2003-02-04 09:57 Afile

That all works right up until the last line, where I see the file owner is
jill, not jack. Maybe I've misunderstood this, but the chmod(1) man pages
don't mention the owner being forced, only group. So have I got it wrong
(most likely), or is the Samba Howto Collection wrong in the many places it
asserts that this can be done?

Thank you for guidance,
Sue


More information about the samba mailing list