[Samba] Force user

Wang, Yu ywang at unf.edu
Thu Jun 3 18:28:02 GMT 2004


The 6775 sets the directory a set-uid and set-gid directory NOT set the sticky bit on. 1775 or 1777 is to set the directory's sticky bit (the difference between 1775 and 1777 is former allows directory owner and group members to write to the directory and latter allows all users to write to the directory. All files/directories created under the directory owned by the creator).

--Yu Wang

Information Technology Services
University of North Florida
(904) 620-2820

-----Original Message-----
From: samba-bounces+ywang=unf.edu at lists.samba.org
[mailto:samba-bounces+ywang=unf.edu at lists.samba.org]On Behalf Of Susan
Sent: Thursday, June 03, 2004 2:06 PM
To: samba at lists.samba.org
Subject: [Samba] Force user

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

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,
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list