DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-11-03 20:10:14

ldomaigne
Member
Registered: 2007-06-24
Posts: 28

uid/gid mapping problem

Good Evening,

Possibly this question is more samba than DNS-323 related... But since the samba server is running on a DNS-323 box, I thought I may ask in this forum as well big_smile

If I mount my samba share as follows from my Linux box neumann:

Code:

$ sudo mount -t cifs -o username=loic%xxx  //<IP>/Volume_1/data/neumann /mnt/nas/

Doing so with the standard smb config, I have problem regarding uid/gid mapping. For instance:

Code:

loic@neumann ~]$ id
uid=501(loic) gid=501(loic) groups=501(loic),602(pmwiki)
loic@neumann ~]$ cd /mnt/nas/
[loic@neumann nas]$ touch bar
[loic@neumann nas]$ ls -ld bar
-rwxrwxrwx 1 antje antje 0 Nov  3 18:44 bar

A telnet session to the DNS-323 reveals:

Code:

mnt/HD_a2/data/neumann # ls -ld bar
-rwxrwxrwx    1 loic     502             0 Nov  3 18:44 barc

The problem is that user loic has uid 502 on the DNS-323 box, but 501 on the Linux box.. And incidently, 502 corresponds to user 'antje' on the Linux box... Even if uid/gid are not right, I can copy, edit, rm the file, but I cannot chmod:

Code:

[loic@neumann nas]$ chmod 644 bar
chmod: changing permissions of `bar': Operation not permitted

I managed to get what I wanted by using the option 'unix extensions = no' for the smb.conf, and mounting the samba share on the Linux box as:

Code:

 sudo mount -t cifs -o username=loic%XXX,uid=501,gid=501 //<IP>/Volume_1/data/neumann /mnt/nas/

The samba version on my DNS-323 box is: 3.0.24. I believe that 'unix extensions' are set by default for that version, is it correct? I understood that this 'unix extensions' option should simplify uid/gid mapping (in a similar way to NFS). Unfortunately, I wasn't able to use this options correctly, to get what I wanted regarding file permissions, etc.

Could someone perhaps enlighten me?

Thanks in advance,
Loic.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB