I ran the following command to give the wheel group rwx permissions on new files and subdirectories created:[belmin@server1]$ ls -latotal 24drwxr-sr-x+   2 guards guards  4096 Aug 27 15:30 .drwxr-xr-x  104 root   root   12288 Aug 27 15:19 ..[belmin@server1]$ sudo setfacl -m d:g:wheel:rwX .[belmin@server1]$ getfacl .# file: .# owner: guards# group: guards# flags: -s-user::rwxgroup::r-xgroup:wheel:rwxother::r-xdefault:user::rwxdefault:group::r-xdefault:group:wheel:rwxdefault:mask::rwxdefault:other::r-xHowever, when I create a file as root, I am not completely clear how the effective permissions are calculated:[belmin@server1]$ sudo touch foo[belmin@server1]$ getfacl foo# file: foo# owner: root# group: guardsuser::rw-group::r-x                      #effective:r--group:wheel:rwx                 #effective:rw-group:guards:rwx                #effective:rw-mask::rw-other::r--Can someone elaborate on what this means?
How does ACL calculate the effective permissions on a file?
linux;files;permissions;acl
effective permissions are formed by ANDing the actual (real?) permissions with the mask. Since the mask of your file is rw-, all the effective permissions have the x bit turned off.