[Samba] Cannot write over root owned file

david rankin drankin at cox-internet.com
Wed May 3 18:56:34 GMT 2006


From: "Larry Alkoff" <labradley at mindspring.com>
> However, when I tried to copy over a root owned file, first as su and then 
> as su -, the operation failed.  Why can't I copy over a root owned file 
> when I'm root?
>
> I also noticed that, when I touched as su or su -, I could create the file 
> but in each case owner was lba:users.  However, when I did the same touch 
> within my own file system, the file owner became root.
>
> I smbmounted the share with a simple _root_ script containing:
> smbmount  //tillie/all  /mnt/tillie  -o uid=0
> Shouldn't that have given me root priviledges?
>
> Which leads to the question,  how do I act as root on a samba share?
> Or perhaps the question is how do I become root on the share?
> Is sharing as root okay or is it bad practice?  Why?
>

Larry, in your smb.conf, try this:

        valid users = you
        force user = root
        force group = root
        admin users = you

I believe if you just set admin users = whoever, that will force the user 
and group to root by default. It has been a while since I played with this, 
but I still use it and it works...

Aside: Next time you are at the Salt Lick in Driftwood, don't forget to 
order the blueberry cobbler and vanilla ice cream desert. Yes, after the 
family style all you can eat, it will hurt, but it is worth it...

--
David C. Rankin, J.D., P.E.
RANKIN LAW FIRM, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
(936) 715-9333
(936) 715-9339 fax
www.rankinlawfirm.com
-- 



More information about the samba mailing list