[Samba] Can't get 'dos filemode' to work as expected

TAKAHASHI Motonobu monyo at monyo.com
Fri Mar 25 07:43:38 MDT 2011


From: Felix Brack <fb at ltec.ch>
Date: Thu, 24 Mar 2011 10:09:53 +0100

> After an upgrade to samba 3.5.8 (from 3.2.5) the option 'dos filemode' 
> does not seem to work anymore. If I (as a user) do not own the file I 
> can't change permissions.
> 
> I am user 'felix' and member of supplementary group 'Development'. To 
> test things I use the following share definition:
> 
> [Temp]
>          path = /srv/samba/file-shares/tmp
>          browseable = yes
>          read only = no
>          invalid users = root administrator
>          delete readonly = yes
>          inherit owner = yes
>          force group = Development
>          dos filemode = yes
> 
> A 'getfacl' on /srv/samba/file-shares/tmp returns:
> 
> # file: srv/samba/file-shares/tmp
> # owner: root
> # group: root
> # flags: -s-
> user::rwx
> group::r-x
> group:Development:rwx
> mask::rwx
> other::---
> default:user::rwx
> default:group::r-x
> default:group:Development:rwx
> default:mask::rwx
> default:other::---

As far as I examined, "dos filemode" works file at Samba 3.5.8.

I connect to \\lenny5\aclshare2a and can change the other's permission
(same as running "chmod o+r test2.txt").

Here is my settings:

-----
lenny5:/var/lib/samba/shares# cat /usr/local/samba/lib/smb.conf
[global]

[aclshare2]
  path = /var/lib/samba/shares/aclshare2
  writeable = yes

  force group = root
  inherit permissions = yes
  dos filemode = yes

  store dos attributes = yes
  map archive = no
  map read only = no

[aclshare2a]
  path = /var/lib/samba/shares/aclshare2
          browseable = yes
          read only = no
          invalid users = root administrator
          delete readonly = yes
          inherit owner = yes
          force group = Development
          dos filemode = yes
-----

Both for aclshare2 and aclshare2a Samba works fine.

lenny5:/var/lib/samba/shares# /usr/local/samba/sbin/smbd -V
Version 3.5.8

lenny5:/var/lib/samba/shares# getfacl aclshare2/
# file: aclshare2/
# owner: root
# group: root
user::rwx
group::r-x
group:Development:rwx
mask::rwx
other::---
default:user::rwx
default:group::r-x
default:group:Development:rwx
default:mask::rwx
default:other::---

lenny5:/var/lib/samba/shares# getfacl aclshare2/test2.txt
# file: aclshare2/test2.txt
# owner: root
# group: root
user::rw-
group::rw-
group:Development:rwx
mask::rwx
other::r-- 

lenny5:/var/lib/samba/shares# id monyo
uid=1000(monyo) gid=100(users) groups=100(users),1016(Development)

---
TAKAHASHI Motonobu <monyo at samba.gr.jp>


More information about the samba mailing list