samba permissions mystery ?

dave selby dave6502 at googlemail.com
Wed Jun 27 20:58:24 UTC 2007


OK dumb hacker here ...

So I have samba running, my umask is 077, ie if I touch test I get ...
-rw-------

the samba share is actualy held in
/export/samba/windows

with [global]

# Max permissions for a share
create mode = 770
directory mode = 770

the samba mount point for this share is
/mnt/windows

and its mounted via smbfs with fmask=0770 and dmask=0770

##################################################

dave at dave-desktop:/mnt/windows$ touch test
dave at dave-desktop:/mnt/windows$ ls -al
total 8
drwxrwx--- 1 dave dave 4096 2007-06-27 21:45 .
drwxrwx--- 5 root dave 4096 2007-06-27 21:41 ..
-rwxrwx--- 1 dave dave    0 2007-06-27 21:50 test
dave at dave-desktop:/mnt/windows$

OK permissions as expected on mounted side :) - they are fixed rigid
by the smbfs mount fmask & dmask.

oot at dave-desktop:/export/samba/windows# ls -al
total 8
drwxrwx--- 2 root smbwindows 4096 2007-06-27 21:50 .
drwxrwxrwx 5 root root       4096 2007-06-27 21:29 ..
-rwxrw---- 1 dave dave          0 2007-06-27 21:50 test
root at dave-desktop:/export/samba/windows#

But strange on the share side, why a group RW ?

dave at dave-desktop:/mnt/windows$ chmod a-x test
dave at dave-desktop:/mnt/windows$ ls -al
total 8
drwxrwx--- 1 dave dave 4096 2007-06-27 21:45 .
drwxrwx--- 5 root dave 4096 2007-06-27 21:41 ..
-rwxrwx--- 1 dave dave    0 2007-06-27 21:50 test
dave at dave-desktop:/mnt/windows$

OK permissions as expected on mounted side :) - they are fixed by the
smbfs mount fmask & dmask.

root at dave-desktop:/export/samba/windows# ls -al
total 8
drwxrwx--- 2 root smbwindows 4096 2007-06-27 21:50 .
drwxrwxrwx 5 root root       4096 2007-06-27 21:29 ..
-rwxrw---- 1 dave dave          0 2007-06-27 21:50 test
root at dave-desktop:/export/samba/windows#

But strange on the share side, why is there still a user X, should
have gone. there are no force create / directories modes in smb.conf

I am a little confused

can anyone enlighten me ?

Cheers

Dave








-- 

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html




More information about the ubuntu-users mailing list