From owner-freebsd-ports@FreeBSD.ORG Tue Dec 28 05:25:52 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52E02106564A for ; Tue, 28 Dec 2010 05:25:52 +0000 (UTC) (envelope-from troy@twisted.net) Received: from oz.twisted.net (oz.twisted.net [69.211.34.241]) by mx1.freebsd.org (Postfix) with ESMTP id 0BF8A8FC22 for ; Tue, 28 Dec 2010 05:25:51 +0000 (UTC) Received: from oz.twisted.net (localhost [127.0.0.1]) by oz.twisted.net (Postfix) with ESMTP id 633CDFF21B4; Mon, 27 Dec 2010 23:25:55 -0600 (CST) X-Virus-Scanned: amavisd-new at example.com Received: from oz.twisted.net ([127.0.0.1]) by oz.twisted.net (oz.twisted.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6k9sPTzj-Wup; Mon, 27 Dec 2010 23:25:40 -0600 (CST) Received: from [172.16.0.5] (sindrome.twisted.net [172.16.0.5]) by oz.twisted.net (Postfix) with ESMTP id 410FEFF1F38; Mon, 27 Dec 2010 23:25:18 -0600 (CST) Message-ID: <4D197460.8040909@twisted.net> Date: Mon, 27 Dec 2010 23:23:44 -0600 From: Troy User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Micheas Herman References: <4D191700.7000802@twisted.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: File ownership being changed to root:wheel ownership after copying to samba server X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: troy@twisted.net List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2010 05:25:52 -0000 I figured it out from your hints. I had admin users = foo, bar and then in my username-map I had foo=bar and that magically made it become root. To fix it, I removed foo and only left admin users = bar Thank you On 12/27/2010 9:10 PM, Micheas Herman wrote: > On Mon, Dec 27, 2010 at 2:45 PM, Troy wrote: >> A very strange problem just started happening with Samba after I upgraded to >> version samba34-3.4.9 on FreeBSD 8.0-STABLE. >> >> Let's say my username is foobar. I copy a file named To Fix.txt from a >> windows desktop machine to a samba share. >> >> In the log it shows the following: >> >> [2010/10/28 00:53:16, 2] lib/access.c:406(check_access) >> Allowed connection from 172.16.0.5 (172.16.0.5) >> [2010/10/28 00:53:24, 2] smbd/open.c:580(open_file) >> foobar opened file Working/To Fix.txt read=Yes write=Yes (numopen=2) >> [2010/10/28 00:53:24, 2] smbd/close.c:612(close_normal_file) >> foobar closed file Working/To Fix.txt (numopen=1) NT_STATUS_OK >> >> Then when I look at the owner:group of the file that was just copied it >> shows: >> >> -rwxr-xr-x 1 root wheel 1422 Oct 27 16:07 To Fix.txt* >> >> I cannot figure out why the file is owned by root:wheel when it should be >> foobar:foobar. >> >> No sticky bit is set on the directory and the parent directory permissions >> are owned by the user foobar:wheel >> >> drwxr-xr-x 6 foobar wheel 512 Oct 28 00:53 Working/ >> >> This is only happening when I copy over files using Samba. Anyone have any >> ideas? > It looks like foobar is being mapped to root. There are several ways > that this can happen. > > My first suspect would be that force user = root has been put in the > smb.conf file by a gui, and the change only took place after the > restarting of samba. (only because this happened to me once.) > > My second suspect, (which is more likely) would be that smbpasswd was > munged during the upgrade. > > A third possibility is that the user shows up as > > admin users = foobar, admin, troy > > For more useful help, the entire smb.conf file would probably need to be known. > > > >> Thanks >> _______________________________________________ >> freebsd-ports@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-ports >> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >>