[Samba] Force user

Tony Whitmore tonywhitmore at users.sourceforge.net
Thu Jun 3 18:23:33 GMT 2004


Robert Sossomon wrote:

> 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, 
> <END SNIP>
> 
> Sue,
> 
> It looks to me that the owner and group are still the same, there is no
> mention of jill anywhere.  If you mean the permissions are wrong, then
> you need to look at your smb.conf file again to make sure you set the
> permissions flag correctly.

I think that what Sue pasted was what she thinks she _should_ have seen, 
rather than what she _did_ see.

I've been playing this a bit using 3.0.4 on a Debian Stable ext3 
partition and have found the same thing - files created in a SUID 
directory are not owned by the owner of that directory, but the user 
creating them. I've also found threads on the LKML that discuss whether 
or not to support the SUID bit on directories from about two years ago, 
which doesn't seem positive. So, this feature may work on other Unixes 
that support SUID on directories (like FreeBSD, IIRC).

My interest was having the ownership of files within a directory being 
assigned to the owner of that directory, rather than the user creating 
the files. This principally happens when technicians assist a user with 
a file restoration or other admin tasks and then forget to assign 
ownership to the user - which mucks up the quota system! :)

Cheers,

Tony


More information about the samba mailing list