[SWLUG] SAMBA not allowing me to write

Mark Henderson mark at standardblue.org.uk
Mon Jan 7 23:19:46 UTC 2008


On Mon, 07 Jan 2008 22:54:48 -0000, Stephen Constantinou  
<stephanos at writeme.com> wrote:

<snip>

Hi Stephen,

I'm a little rusty on such things, but after a quick google I came up with  
this page:
http://www.justlinux.com/nhf/Filesystems/Mounting_smbfs_Shares_Permanently.html

You might get a little lost in all that. Scroll down to the bottom, this  
is the bit you're interested in:

"Another problem occurs when a non-root user tries to mount a Windows  
share using smbmount. To allow them to do it you need to setuid root the  
smbmnt command. Since smbmnt usually resides in /usr/bin, you can  
accomplish it with this command as root:
chmod u+s /usr/bin/smbmnt

This will not work if you setuid the smbmount command. It is specifically  
written so that it won't execute if it is setuid root.

To allow non-root users to unmount the shares, you need to setuid the  
smbumount command. Execute this as root:
chmod u+s /usr/bin/smbumount"

Basically, as you're currently mounting the share as root; it's owned by  
root, hence your problems. You need/want to be able to mount it as a user,  
but you need root privs to do that. What the above does is let you run the  
relevant command (smbmnt) as a user but with the root privs. Same goes for  
un unmounting with smbumnt. This is what ISTR I had to do when I was last  
doing this.

I may be wrong - I'm no guru. (I expect a guru will slap me down if I am!)

HTH,
Mark


-- 
  http://sb.fotopic.net/ - Bo'ness 37 gala, Dec 07



More information about the Swlug mailing list