UFS ACL understanding

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?
 
Did you enable ACL support for the respective volume?

Look at the output of # tunefs -p /dev/{devicename}.
 
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
Code:
# 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
Code:
# file: dir2/adir
# owner: root
# group: wheel
user::rwx
group::rwx
mask::rwx
other::rwx
 
Yes, reproduced. It seems that ACLs make no sense in this case. If I should take care about umask.
 
Back
Top