LX0-104 · 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. This question asks for the correct setfacl command to revoke write access for all groups and named users on a file by modifying the ACL mask.
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
(35 responses)- A9% (3)
- B3% (1)
- C83% (29)
- D6% (2)
Why each option
This question asks for the correct `setfacl` command to revoke write access for all groups and named users on a file by modifying the ACL mask.
The `-x` option is used to remove an ACL entry, not to modify or revoke specific permissions within existing entries.
The `-x` option would remove the entire mask entry, rather than modifying its permissions to revoke write access.
The `setfacl -m mask::rx afile` command correctly uses the `-m` option to modify an ACL entry and specifically targets the `mask::` entry, setting its permissions to `rx` (read and execute). By limiting the mask to `rx`, it revokes write access for all named user, named group, and owning group entries whose effective permissions are governed by the mask.
This command attempts to modify permissions for all named users and groups directly, which is not the standard or efficient way to revoke a specific permission across all relevant ACL entries; the mask is designed for this purpose.
Concept tested: Linux ACL modification via mask
Source: https://linux.die.net/man/1/setfacl
Topics
Community Discussion
No community discussion yet for this question.