Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Dec 2010 19:10:23 -0800
From:      Micheas Herman <m@micheas.net>
To:        troy@twisted.net
Cc:        freebsd-ports@freebsd.org
Subject:   Re: File ownership being changed to root:wheel ownership after copying to samba server
Message-ID:  <AANLkTikKOFOd3oP2B67mTdDSdn6b5B%2B9pVdyXB1CHQwK@mail.gmail.com>
In-Reply-To: <4D191700.7000802@twisted.net>
References:  <4D191700.7000802@twisted.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 27, 2010 at 2:45 PM, Troy <troy@twisted.net> 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. =A0I 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, =A02] lib/access.c:406(check_access)
> =A0Allowed connection from 172.16.0.5 (172.16.0.5)
> [2010/10/28 00:53:24, =A02] smbd/open.c:580(open_file)
> =A0foobar opened file Working/To Fix.txt read=3DYes write=3DYes (numopen=
=3D2)
> [2010/10/28 00:53:24, =A02] smbd/close.c:612(close_normal_file)
> =A0foobar closed file Working/To Fix.txt (numopen=3D1) NT_STATUS_OK
>
> Then when I look at the owner:group of the file that was just copied it
> shows:
>
> -rwxr-xr-x =A0 1 root =A0 =A0 =A0wheel =A0 =A0 =A0 =A01422 Oct 27 16:07 T=
o 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 permission=
s
> are owned by the user foobar:wheel
>
> drwxr-xr-x =A0 6 foobar =A0wheel =A0 512 Oct 28 00:53 Working/
>
> This is only happening when I copy over files using Samba. =A0Anyone 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 =3D 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 =3D foobar, admin, troy

For more useful help, the entire smb.conf file would probably need to be kn=
own.



>
> 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"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikKOFOd3oP2B67mTdDSdn6b5B%2B9pVdyXB1CHQwK>