Can anyone reproduce this Samba problem?
John W
jwdevel at gmail.com
Thu Aug 27 04:54:03 UTC 2009
I have been trying to set up a 'dropbox' Samba share on FreeBSD, but
am not having luck.
I went back and forth on the Samba ML for a bit, and now I'm trying to
determine if I am seeing FreeBSD-specific bad behavior.
Could anyone out there see if they can reproduce my issue on FreeBSD?
I have a simple reproduction case (repeatable for me, at least), and
I'm curious if people see the same behavior on:
- Samba 3.2 (broken for me)
- Samba 3.3 (broken for me)
- Samba 3.4 (It's not in ports, I haven't installed it manually yet,
but someone with Ubuntu has confirmed it works for them with this
version)
Here is tail of the old thread with gory details, if anyone's interested:
http://www.mail-archive.com/samba@lists.samba.org/msg102359.html
So here is what I am trying to do, and how to reproduce my issue:
I want a dropbox share, with the sticky bit set, and with the file
owner to be inherited from the share directory, for new files/dirs.
Note: I do not want to use SUIDDIR if possible. I realize it is an
option, but am trying to avoid it for now.
So I have a directory like this:
drwxrwxr-t 20 nobody myuser 512 Aug 19 20:07 myshare
And it is shared in smb.conf like this:
[myshare]
comment = my share
path = /path/to/myshare
read only = no
inherit permissions = yes
inherit owner = yes
Now I want to create a directory in this share (from a Windows
machine, or smbclient).
What I would *expect* is this:
drwxrwxr-t 2 nobody myuser 512 Aug 19 14:07 some_new_dir
Notice that the sticky bit is set, and the user is set to 'nobody'
which will ensure that no users, including the original creator, can
alter this directory once created.
And in fact, this is what happens when Jeremy Allison tried it on
Ubuntu 8.10 with Samba 3.4 (see thread mentioned earlier).
HOWEVER, on both my FreeBSD boxes with either Samba 3.2 or 3.3, I
instead get this:
drwxrwxr-t 2 myuser myuser 512 Aug 19 14:07 some_new_dir
Notice the owner is 'myuser' instead of 'nobody'.
Thus, the user 'myuser' can now rename the directory (for instance),
which is not acceptable.
It seems as though 'inherit owner' is just being ignored. I don't know why.
Interestingly, if I turn off 'inherit permissions', then 'inherit
owner' DOES take effect correctly. However, that means the sticky bit
does not get inherited, which will not work for me. I need both to be
inherited, and for some reason they are behaving mutually-exclusive
(with 'inherit permissions' taking precedence).
I have tried this on Samba3.3 and 3.2, both on FreeBSD-7.2_RELEASE
(amd64) machines, and neither works.
So to sum up:
I'd very much appreciate it if some FreeBSD people could try
reproducing this with any/all of Samba 3.2,3.3,3.4.
I'd also be curious of the results with Samba3.2 or 3.3 on a non-FreeBSD Unix.
I'm just trying to determine if I'm crazy or not (:
Thanks
-John
More information about the freebsd-questions
mailing list