[UFO Chicago] SMBFS Question

Neil R. Ormos ormos at ripco.com
Thu Apr 13 13:20:09 PDT 2006


Anyone know smbfs?  I'm having a problem allowing
users other than root read/write access to an
smbfs share.  I think I've carefully read the
docs, but there must be some small thing I've
overlooked.

So here's the problem: I have this computer
running Windows, and have "shared" (exported) a
directory tree ("share").

And I have another computer running Debian Sarge,
from which I'd like some, but not all, users to
access the Windows share.  While root, I can mount
the Windows share with smbfs, and as root,
obviously, I have R/W access to the entire
share. Works fine. But other users cannot
generally access the files R/W.

I thought I understood that a good way to arrange
this is to:

  a: create a new group NEWGROUP to contain the
     users who are supposed to be able to have R/W
     access to the share;

  b: assign those users to NEWGROUP; and

  c: mount the smbfs share with options that
     specify rw,
             uid=whatever,
             gid=NEWGROUP,
             fmask=774,
             dmask=775

Well, I think I've done this.  Files
on the share show permissions
 -rwxrwxr--
and directories on the share show permissions
 drwxrwxr-x
and everything shows ownership
 root  extmnt

("extmnt" is the real name of NEWGROUP)...  but
non-root users who are members of the group
NEWGROUP cannot create files, write to existing
files, or delete files, on the mounted share.

An example of the mount command I was using:

  mount -t smbfs -o rw,username='',password=somepassword,fmask=774,dmask=775,uid=root,gid=extmnt //server/c /mnt/w98c

If I change the mount options to set
fmask=dmask=777, then all users can
create/write/delete on the mounted share, which
isn't what I really want.  If, instead, I change
the mount option uid= to be that of one of the
users, then that user (and root) can
create/write/delete files on the mounted share,
but others cannot, which again isn't what I want.

It doesn't seem that smbfs is recognizing that
users in NEWGROUP are supposed to be able to have
"rwx" access the the files.

Any ideas?

Thanks.

--Neil



More information about the ufo mailing list