From owner-freebsd-questions@FreeBSD.ORG Thu Aug 27 04:54:03 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9150106568B for ; Thu, 27 Aug 2009 04:54:03 +0000 (UTC) (envelope-from jwdevel@gmail.com) Received: from mail-yw0-f202.google.com (mail-yw0-f202.google.com [209.85.211.202]) by mx1.freebsd.org (Postfix) with ESMTP id 674AC8FC19 for ; Thu, 27 Aug 2009 04:54:03 +0000 (UTC) Received: by ywh40 with SMTP id 40so1014614ywh.14 for ; Wed, 26 Aug 2009 21:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=DCdkgOTZ/8qNpml+B+2jRSclaqaLm8mKzxpi+cqUG00=; b=GC8g4gsPHAkIWYSPJxatYsX7Es7BrVQ/eEV4rH8V0GdAxL7Zy5tk9iz7gQfnmDdFDb hoAmOq4pA6+LyWhcoIgSFp+E2PGUYG1sXrRo15+098/EjS5ZBWIld4/ZI1a3Z24WgWDK sMkS283JEuQbuQ7valn7NSW4XNygsqtdJclCI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=u/7NlhX6uXE43T1UDceaUBn9B+L1K5OKvRnKFw9MbAS5hytLz/KOKXByQlMP4qZOkP RPzUxhRYYvt4mMCOHB3pBRHFphcgeAP2n5QD4C8aGOVN3vCpZNL0w3Vujyy5ekS4yfo3 OqAkeMkpUGYjam6DuUm44IXm+DClRHb+LynO0= MIME-Version: 1.0 Received: by 10.90.174.7 with SMTP id w7mr6733097age.11.1251348842548; Wed, 26 Aug 2009 21:54:02 -0700 (PDT) Date: Wed, 26 Aug 2009 21:54:02 -0700 Message-ID: From: John W To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Can anyone reproduce this Samba problem? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2009 04:54:03 -0000 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