300-300 · Question #74
Which command adds read permissions for the user alice to the Unix access control list of the file finance.ods?
The correct answer is D. setfacl -m user:alice:r finance.ods. setfacl -m user:alice:r finance.ods is correct because setfacl is the standard Unix command for modifying ACL entries, the -m flag means "modify/add," and the format user:alice:r correctly specifies the entry type, the named user, and the read permission. A is wrong because…
Question
Options
- Afacl --add alice:r-- finance.ods
- Baddfacl alice:r- finance.ods
- Csmbfacl modify alice=r finance.odt
- Dsetfacl -m user:alice:r finance.ods
- Esetacl --add alice:r finance.ods
How the community answered
(31 responses)- A3% (1)
- B6% (2)
- D90% (28)
Explanation
setfacl -m user:alice:r finance.ods is correct because setfacl is the standard Unix command for modifying ACL entries, the -m flag means "modify/add," and the format user:alice:r correctly specifies the entry type, the named user, and the read permission. A is wrong because facl is not a real command - it's a fabricated near-miss. B (addfacl) doesn't exist at all. C uses smbfacl, which relates to Samba/Windows share permissions, not Unix ACLs - and it also sneaks in the wrong file extension (.odt instead of .ods). E uses setacl, which sounds plausible but is not a real Unix utility; the correct command is setfacl.
Memory tip: Think "set-f-acl" = "set file ACL" - the f stands for file, and -m stands for modify, which is what you do when granting access to a specific user.
Topics
Community Discussion
No community discussion yet for this question.