LFCS · Question #362
You wish to revoke write access for all groups and named users on a file. Which command will make the correct ACL changes?
The correct answer is C. setfacl m mask::rx afile. To revoke write access for all groups and named users on a file, the ACL mask must be modified to exclude write permissions.
Question
Options
- Asetfacl x group::rx,user::rx afile
- Bsetfacl x mask::rx afile
- Csetfacl m mask::rx afile
- Dsetfacl m group::rx,user::rx afile
How the community answered
(29 responses)- A3% (1)
- B14% (4)
- C79% (23)
- D3% (1)
Why each option
To revoke write access for all groups and named users on a file, the ACL mask must be modified to exclude write permissions.
The `-x` option is used to remove specific ACL entries, not to modify the permissions of existing entries or the mask itself.
The `-x` option would attempt to remove the mask entry entirely, rather than modifying its permissions to `rx`.
The `setfacl -m` command is used to modify an existing ACL entry, and setting `mask::rx` effectively removes write permission for all named users, named groups, and the owning group, as the mask defines the maximum permissions these entries can have.
While `-m` is for modifying, specifying `group:*:rx,user:*:rx` is not the correct syntax or method to universally revoke write access by manipulating the mask; the mask entry itself should be targeted.
Concept tested: Linux ACL mask modification
Source: https://www.redhat.com/sysadmin/linux-access-control-lists
Topics
Community Discussion
No community discussion yet for this question.