The permissions granted by the entry; any combination of r (read), w (write), and x (execute). When displayed by the
To modify the ACL, use the
$ setfacl -m
$ getfacl
# file: test
# owner: chris
# group: chris
user::rw-
user:thomas:r--
group::rw-
mask::rw-
other::r--
This additional ACL entry shows up on a line of its own. Notice that a mask entry is now displayed, showing the maximum permission available to users and groups identified by a qualifier; this mask value corresponds to the group permission of the traditional Linux permission mode, as displayed by
When
$ ls -l
-rw-rw-r--+ 1 chris chris 0 May 6 20:52 test
The + after the file permissions indicates that an ACL is in effect in addition to the permissions shown.
Changing the file mode using the chmod command alters the ACL mask value:
$ chmod
$ ls -l
-rw-r--r--+ 1 chris chris 0 May 6 20:52 test
$ getfacl
# file: test
# owner: chris
# group: chris
user::rw-
user:thomas:r--
group::rw- #effective:r--
mask::r--
other::r--
The new group permission has been set to r-- (read-only), and this is also used as the mask value. Because the mask is more limiting than the group value in the ACL, the group permission has effectively changed to r-- , as indicated by the #effective:r-- comment in the output.
This works both ways; changing the mask using
$ ls -l
-rw-r--rwx+ 1 chris chris 0 May 6 20:52 test
$ setfacl -m
$ ls -l test
-rw-rw-rwx+ 1 chris chris 0 May 6 20:52 test
$ getfacl
# file: test
# owner: chris
# group: chris
user::rw-
user:thomas:r--
group::rw-
mask::rw-
other::rwx
On the other hand, changing the default group ACL entry affects both that entry and the mask value:
$ setfacl -m
$ ls -l
-rw-r--r--+ 1 chris chris 0 May 6 20:52 test
$ getfacl
# file: test
# owner: chris
# group: chris
user::rw-
user:thomas:r--
group::r--
mask::r--
other::r--
The g::r argument is a short form for group::r.
To change multiple ACL entries at one time, separate them by commas:
$ setfacl -m
$
getfacl
# file: test
# owner: chris
# group: chris
user::rw-
user:thomas:r--
user:diane:rw-
user:jim:r--
group::r--
mask::rw-
other::r--