[Samba] Permissions issue with CIFS mounted share

Mitch Jackson perimus at gmail.com
Fri Jul 7 18:43:12 GMT 2006


I've tried some internet and list searching, but I haven't been able to
find anybody with the same issue.  It's hard to search for "samba cifs
force user problem" because it hits nearly every samba tech support
question ever asked.

The smbfs kernel module disappeared from the stock fedora kernels
recently *crycry*  Now my shares that were mounted via smbfs have to be
mounted via cifs.  cifs is, apparantly, not a drop-in replacement for
smbfs however, as it behaves differnetly with the same configuration
options.

Clients that used to be able to access a remote share and change files
are not denied access to the shared files when they mount it, because
the uid= and gid= mount options are ignored.

My share looks like this:
[techadmin]
   force user = techadmin
   valid users = ****
   writeable = yes
   path = /var/www

My fstab line looks like this
//server/techadmin /mnt/techadmin cifs
rw,uid=500,gid=500,credentials=/etc/samba/techadmin.cred 0 0

When mounting this share via smbfs, all files on the local machine
appear to be owned by 500:500, but on the server the files maintain
their actual permissions.

When mounting this share via cifs, all files on the local machine
appear to be owned by the local uid corresponding to the remote uid.
Since techadmin is uid 501 on //server then the mounted files appear to
be owned by uid 501 on the local machine with the mounted share.  uid
501 is, of course, a totally unrelated user.

The man page for mount.cifs says, in relation to the uid= and gid=
options:
"This parameter is ignored when the target server supports the CIFS
unix extensions"

Is it ignored because there's a better way to get the same behavior?
If not, is there a way to force cifs to not ignore these options?

Any input is appreciated.

/mitch

================================
== ATTACHED COMPLETE smb.conf ===
================================
[global]
  workgroup = WORKGROUP
  server string = Domain Master
  hosts allow = 192.168.0. 192.168.1. 192.168.2. 127.
  log file = /var/log/samba/log.smbd
  max log size = 5000
  security = user
 encrypt passwords = yes
 smb passwd file = /etc/samba/smbpasswd
  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  dns proxy = no

[fedora4]
  path = /fedora4
  comment = RedHat Fedora 4 Repository
  public = yes
  writable = yes
  write list = ***
       printable = no
  valid users = ***
  create mask = 0765

[techadmin]
       force user = techadmin
       valid users = ***
       writeable = yes
       path = /var/www


More information about the samba mailing list