The Samba-Bugzilla – Bug 6857
Can't get 'inherit owner' and 'inherit permissions' to work together on FreeBSD
Last modified: 2009-10-29 21:32:08 UTC
I am seeing some strange behavior using samba33 (and samba32) on
I have been emailing with another who has an identical samba
configuration (using samba 3.4 instead of my 3.3) on Ubuntu Linux 8.10
equivalent and does not see the problem.
That thread can be viewed here (see the responses from Jeremy Allison)
Perhaps I do not understand something about FreeBSD, but it definitely
seems like wrong behavior from samba on this platform.
Here are the details:
I am trying to create a 'dropbox' share, where users can create
files/directories, but cannot edit them once created.
I am using 'inherit owner' on this share, but it is not being respected.
The shared dir looks like:
drwxrwxr-t 18 nobody jrw 512 Aug 19 19:11 myshare
The share stanza looks like:
path = /whale/shares/myshare
read only = no
inherit owner = yes
inherit permissions = yes
directory mask = 07775
Yet, when a new directory is created in this shared directory (via
smbclient or from a Windows machine), the newly created dir looks
drwxrwxr-t 2 jrw jrw 512 Aug 19 19:11 newdir
As you can see, the owner is 'jrw' (the user I log in with), rather
than the parent directory's owner of 'nobody'.
It is the same if I use a non-authenticated share (the owner of the
new dir is the samba guest account, in that case).
Additionally, if I comment out 'inherit permissions' and 'directory
mask', then the owner IS set to 'nobody', but the permissions are
wrong, so that is not useful to me.
It seems like 'inherit owner' is only respected if the directory
permissions are NOT set. But I need them to be set to get the sticky
bit on the newly created directories.
I have tried this on samba3.3 and 3.2, on FreeBSD-7.2_RELEASE (amd64),
on two different machines.
Another person I've talked to had used the exact same samba settings
on Ubuntu has this working with no problem.
Anyway, let me know if I can do anything to help investigate further.