samba permissions mystery ?

NoOp glgxg at mfire.com
Thu Jun 28 02:23:59 UTC 2007


On 06/27/2007 01:58 PM, dave selby wrote:
> 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

Don't know, but perhaps this might be helpful:

http://ubuntuguide.org/wiki/Ubuntu:Feisty#Samba_Server






More information about the ubuntu-users mailing list