XK0-006 System Management Practice Question
An administrator needs to add an ACL entry to a file that grants the user 'john' read and write permissions. The file currently has no ACLs. Which command should the administrator use?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
setfacl -m u:john:rw file
The correct command is setfacl -m u:john:rw file. setfacl is used to modify ACLs. getfacl is used to display ACLs and does not support a -m option for modifying ACLs on standard Linux systems.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
chmod u+rw file
Why it's wrong here
chmod u+rw alters the file's owning-user permission bits, not the ACL entry for a named user, so john gains nothing unless he owns the file. It is tempting because chmod is the familiar tool for granting read and write access, and it would be correct for changing the owner's own permissions.
- ✗
setfacl -x u:john file
Why it's wrong here
setfacl -x removes an existing ACL entry for john rather than adding one, and the file has no ACLs to remove. It is tempting because it uses the correct setfacl utility with the same u:john syntax, and it would be correct when revoking a named user's access.
- ✓
setfacl -m u:john:rw file
Why this is correct
setfacl with -m modifies the ACL, and u:john:rw grants john read and write. Since the file has no existing ACLs, this creates the access ACL entry directly, satisfying the requirement without altering the traditional owner, group or other permission bits.
- ✗
getfacl -m u:john:rw file
Why it's wrong here
getfacl only reads and displays ACL entries; it cannot modify them, so no entry is added. It is tempting because its syntax mirrors setfacl's -m u:name:rw form, and getfacl would be the right command to verify the entry afterwards.
Visual reference
Go deeper
Related to this question
Learn chapter
User and Group Administration
Key term
setfacl
setfacl is a Linux/Unix command used to set Access Control Lists on files and directories, providing more detailed permission control beyond the standard owner-group-others model.
Key term
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
About these practice questions
This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.