# UFS ACL understanding



## brom (Apr 17, 2013)

Hello,

I want to set some default ACL for the parent directory and want all new files and directories inherit this ACL. man says that this possible:


> It is possible for files and directories to inherit ACL entries from their parent directory.  This is accomplished through the use of the default ACL.  It should be noted that before you can specify a default ACL, the mandatory ACL entries for user, group, other and mask must be set.  For more details see the examples below.  Default ACLs can be created by using -d.


My task is to set up a default ACL with rwx for "other" on the parent directory and inherit this to directory structure. But for some reason this doesn't work. Is this possible at all?


----------



## Anonymous (Apr 17, 2013)

Did you enable ACL support for the respective volume?

Look at the output of `# tunefs -p /dev/{devicename}`.


----------



## brom (Apr 17, 2013)

Sure,

```
tunefs: POSIX.1e ACLs: (-a)                                enabled
```


----------



## Anonymous (Apr 17, 2013)

Seems to me that somehow the current umask is applied to the default ACL's.

Example 1 (umask left as is, usually 0022):

`# mkdir -m 777 dir1`
`# setfacl -d -m user::rwx,group::rwx,other::rwx,mask::rwx dir1`
`# mkdir dir1/adir`
`# getfacl dir1/adir`

```
# file: dir1/adir
# owner: root
# group: wheel
user::rwx
group::rwx		# effective: r-x
mask::r-x
other::r-x
```

Example 2:

`# umask 0000`
`# mkdir -m 777 dir2`
`# setfacl -d -m user::rwx,group::rwx,other::rwx,mask::rwx dir2`
`# mkdir dir2/adir`
`# getfacl dir2/adir`

```
# file: dir2/adir
# owner: root
# group: wheel
user::rwx
group::rwx
mask::rwx
other::rwx
```


----------



## brom (Apr 18, 2013)

Yes, reproduced. It seems that ACLs make no sense in this case. If I should take care about umask.


----------

