ACLs inheritance problem

Francis Dubé francis at optiksecurite.com
Tue Aug 31 20:07:05 UTC 2010


Hi list,

Here's my case. We have 3 web developpers creating files and folders in 
our main "web" folder. We would like to setup ACLs allowing them to 
modify each others file. So this is what I'm doing :

# mkdir web
#setfacl -d -m u::rwx,g::rwx,o::rx,g:web:rwx web
# setfacl -m u::rwx,g::rwx,o::rx,g:test1:rwx web
# getfacl -d web
    # file: web
    # owner: root
    # group: wheel
    user::rwx
    group::rwx
    group:web:rwx
    mask::rwx
    other::r-x
# getfacl web
    # file: web
    # owner: root
    # group: wheel
    user::rwx
    group::rwx
    group:web:rwx
    mask::rwx
    other::r-x

Now, when I create a subfolder or a file in the "web" folder, I would 
expect them to have theses ACLs.

# mkdir web/subfolder
# touch web/file
# getfacl web/file
    # file: web/file
    # owner: root
    # group: wheel
    user::rw-
    group::rwx              # effective: r--
    group:web:rwx         # effective: r--
    mask::r--
    other::r--
# getfacl web/subfolder
    # file: web/subfolder
    # owner: root
    # group: wheel
    user::rwx
    group::rwx              # effective: r-x
    group:web:rwx         # effective: r-x
    mask::r-x
    other::r-x

Where is that new mask coming from ? Shouldn't it be the same as the 
default mask from it's parent directory ? I need the new files to be 
writable by the "web" group by default, am I missing something ?

We are using FreeBSD 8.1 Released on AMD64.

Any pointer would be appreciated, thanks a lot.

Francis Dubé

.


More information about the freebsd-questions mailing list