mounting samba shares with smbmount
'Robin' R. Battey
zanfur at u.washington.edu
Mon Apr 23 14:04:17 PDT 2001
The samba server can't force permissions of the UNIX files. All access is
done as a valid user, whether it be "nobody", or "root", or a normal user.
If the user that samba is trying to be does not have access to the files
"under the hood", so to say, then it doesn't matter what the exported
permissions are. But, what you can do (like I said in the previous
email) is to use a "force group=1000" (except use the real name, not the
gid), which will cause all accesses to be by group 1000 on the server
side. So, if you have files owned by "boobab" that you want everyone to
be able to modify, you can either make the files chmod 0777 or put a
"force user=boobab" in the share section of your smb.conf.
Hope this helps. Cheers!
On Sun, 22 Apr 2001, Mike wrote:
> Thanks Robin. Doh! I didn't read the smbmount man page closely enough to
> realize that the "-o" options were to be delimited with commas, not
> spaces! I got things looking pretty swell with:
> smbmount "\\\\fserv\\s" /s -o guest,uid=99,gid=1000,fmask=0664,dmask=0775
> I think the file/directory permissions can probably be forced by the Samba
> server, but that's down the road...
> -=<(| mike at boobaz.net |)>=-
> On Sun, 22 Apr 2001 at 15:55, 'Robin' R. Battey wrote:
> |smbd claims to be windows NT by default, allowing winNT users to futz with
> |permissions and whatnot. This means that the server actually exports the
> |real permissions of the actual files when mounted to NT or Linux clients.
> |The "-o ro" or "-o rw" options are only masks (as is the fmask option,
> |obviously). All they do is mask out bits of the actual permission bits.
> |(sort of: the "-o ro" option also labels it as a "Read only filesystem",
> |which gives different errors than simple access permission errors). If
> |you want the files to be writeable by group so-and-so, they have to be
> |actually writeable by that group. Or, you can use a level of indirection
> |and place force "user=foo" in your smb.conf file under your share, which
> |will force all access to be done as user "foo", regardless of what the
> |client connected as. This is really useful for read-write file
> |depositories where multiple users use the same share. There is a similar
> |"group=bar" option that forces a particular group upon the client. Note:
> |these do *not* do the same thing as the "users" or "valid users"
> |flags--those specify which names are allowed to connect. The "force"
> |options have nothing to do with authentication to the shares.
> |Hope this helps. Cheers!
> |P.S. the uid=foo and gid=bar options to smbmount are really only useful
> |when no permission information is exported with the share (i.e. windows 9x
> |On Sun, 22 Apr 2001, Slowping wrote:
> |> try the "-o rw" flag in the smbmount command.
> |> Also, try adding "writable = yes" to the [s] block in smb.conf.
> |> Don't know if this will solve your problem, but worth a shot I guess.
> |> On Sun, 22 Apr 2001, Mike wrote:
> |> > Hi there. I'm learning to use samba (2.0.7) today. I've got a server
> |> > with a couple of shares, and they seem to work just fine from a Windows
> |> > client.
> |> >
> |> > I'm now trying to mount these shares from another Linux box. It gets
> |> > mounted ok, but the permissions on the files aren't what I want.
> |> > Basically I'm trying to implement a share with full (rwx) permissions.
> |> > When I mount it the permissions are set to "nobody" owned, 0755.
> |> >
> |> > Here's how I'm mounting:
> |> > # smbmount "\\\\fserv\\s" /s -o uid=99 gid=99 rw fmask=1777
> |> > # mount
> |> > //fserv/s on /s type smbfs (0)
> |> > # ls -ld /s
> |> > drwxr-xr-x 1 nobody root 512 Apr 22 04:08 /s
> |> >
> |> > In the server's smb.conf I've placed, amongst other things:
> |> > guest only = yes # (globally)
> |> > [s]
> |> > comment = share
> |> > path = /share
> |> > read only = no
> |> > public = yes
> |> >
> |> > Any idea how I can mount this share as read/write? Thanks.
> |> >
> |> > ---------------------------
> |> > -=<(| mike at boobaz.net |)>=-
> |> >
> |> >
More information about the Linux