Sample Header Ad - 728x90

ACLs are not respected on FreeBSD

1 vote
1 answer
467 views
I am trying to set default group permission for the folder on FreeBSD 13.0
$mkdir test
$setfacl -d -m u::rwx,g::rwx,o::rx,mask::rwx test
$getfacl -d test
# file: test
# owner: john
# group: wheel
user::rwx
group::rwx
mask::rwx
other::r-x
$cd test
$touch file

$ls -l file
-rw-r--r--+ 1 john  wheel     0B Jul  9 19:32 file

$getfacl file
# file: file
# owner: john
# group: wheel
user::rw-
group::rwx              # effective: r--
mask::r--
other::r--
As you can see, the group permissions are not inherited properly. I do not care about the x flag for the user and group, that's a security mechanism. However, the group should have the write permission, which is not the case. The same behavior can be observed for folders created by the 'mkdir' command. On ArchLinux the same set of commands works just fine. On FreeBSD somehow umask takes over, which should be normally overridden by acls. If I change umask to 002, I get the desired result. On FreeBSD I am using UFS2 filesystem, on ArchLinux - ext4. Any thoughts about this?
Asked by abendrot (11 rep)
Jul 9, 2021, 05:40 PM
Last activity: May 27, 2023, 07:09 PM