[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Samba ownership issue - uid option does not seem to work



Or, at least, it doesn't work as I expect, from what the manuals and
Google tell me.

Samba server is a Debian unstable machine, clients are a Windows XP
box and a Debian unstable box.

Files on the server are owned by samba:users (uid/gid 1000:100).
Samba guest access is mapped to this samba user.

Windows XP client is able to access the files correctly, but I can't
find any more info on the (supposed/reported) ownership of the files.

On the Debian unstable client, uid 1000 isn't used.  gid 100 match the
'users' group.

My readings of the doc lead me to believe that the mount/smbmount
uid/gid options allow me to make files served by samba to appear to be
owned by some specific user/group.  However, this isn't what I see,
e.g. :

[rgb@nol/xrs] /mnt : ls -l
total 16K
drwxr-xr-x  2 root root 4.0K Nov 28  2003 cdrom
drwxr-xr-x  2 root root 4.0K Jan 12 14:46 data
drwxr-xr-x  2 root root 4.0K Sep 23  2003 floppy
drwxr-xr-x  5 root root 4.0K Oct 22  2003 win
[rgb@nol/xrs] /mnt : sudo mount -t smbfs //phore/data data -o guest
[rgb@nol/xrs] /mnt : ls -l
total 16K
drwxr-xr-x  2 root root 4.0K Nov 28  2003 cdrom
drwxr-xr-x  1 root root 4.0K Jan 12 14:47 data
drwxr-xr-x  2 root root 4.0K Sep 23  2003 floppy
drwxr-xr-x  5 root root 4.0K Oct 22  2003 win
[rgb@nol/xrs] /mnt : ls -l data
total 8.0M
drwx------  1 1000 users 0 Jan 11 20:15 arch
drwx------  1 1000 users 0 Jan  6 21:05 doc
drwx------  1 1000 users 0 Nov 12 12:11 music
drwx------  1 1000 users 0 Jan  6 21:06 tmp
[rgb@nol/xrs] /mnt : sudo umount data
[rgb@nol/xrs] /mnt : sudo mount -t smbfs //phore/data data -o guest,uid=rgb,gid=users
[rgb@nol/xrs] /mnt : ls -l
total 16K
drwxr-xr-x  2 root root  4.0K Nov 28  2003 cdrom
drwxr-xr-x  1 rgb  users 4.0K Jan 12 14:47 data
drwxr-xr-x  2 root root  4.0K Sep 23  2003 floppy
drwxr-xr-x  5 root root  4.0K Oct 22  2003 win
[rgb@nol/xrs] /mnt : ls -l data
total 8.0M
drwx------  1 1000 users 0 Jan 11 20:15 arch
drwx------  1 1000 users 0 Jan  6 21:05 doc
drwx------  1 1000 users 0 Nov 12 12:11 music
drwx------  1 1000 users 0 Jan  6 21:06 tmp
[rgb@nol/xrs] /mnt :

(using either smbmount or fstab entries instead of the full mount
command line yields the same results).

So it looks to me like the uid/gid mount options only affect the mount
point ownership, not the mounted files ownership.  Mounted files
ownership looks like the samba server box plain numeric ids are being
interpreted with the client local users/groups database.

What I am doing wrong ?



Reply to: