303-300 · Question #117
Which command revokes ACL-based write access for groups and named users on the file afile?
The correct answer is C. setfacl ~m mask: : rx afile. Option C uses setfacl -m mask::rx afile, which modifies the ACL mask to rx (read + execute only). The mask entry acts as a permission ceiling for all named users and named groups - setting it to rx silently strips write access from all of them in one shot, without touching…
Question
Which command revokes ACL-based write access for groups and named users on the file afile?
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
(68 responses)- A3% (2)
- B12% (8)
- C81% (55)
- D4% (3)
Explanation
Option C uses setfacl -m mask::rx afile, which modifies the ACL mask to rx (read + execute only). The mask entry acts as a permission ceiling for all named users and named groups - setting it to rx silently strips write access from all of them in one shot, without touching individual entries.
Why the distractors fail:
- A uses
-x(remove/delete entries), but-xcannot accept permission values likerx- you can only specify what entry to delete, not what permissions to set. Wildcards (*) in user/group names are also invalid. - B uses
-x mask::rx, which has the same-xproblem - you can't pair-xwith a permission string. The correct form to delete a mask would besetfacl -x mask afilewith no permissions. - D uses
-mcorrectly but tries to apply permissions directly togroup:*anduser:*with wildcards, whichsetfacldoes not support as a glob syntax.
Memory tip: Think of the ACL mask as a dimmer switch that overrides everyone's individual settings. -m makes a change; -x expunges an entry. To cap permissions without removing ACLs, you modify the mask - so reach for -m mask::rx.
Topics
Community Discussion
No community discussion yet for this question.