Courseiva
System Management →mediumMultiple Choice

XK0-006 System Management Practice Question

An administrator needs to give a user read and write access to a file without changing the file's group or adding the user to any group. Which method should be used?

⚠ Common exam trap

Many exam-takers confuse chmod's u+rw (which affects the file owner) with granting permissions to a different user; candidates often forget that traditional chmod cannot target arbitrary users, which is precisely why ACLs exist.

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:username:rw file

Access Control Lists (ACLs) allow granting permissions to specific users or groups beyond the traditional owner/group/other model. The command 'setfacl -m u:username:rw file' adds a named user entry to the file's ACL, giving that user read and write access without altering the file's group ownership or requiring group membership changes. This is the standard Linux method for per-user granular permissions.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    chown user: file

    Why it's wrong here

    chown changes file ownership, not access permissions, so it grants the user nothing without also altering ownership. It is used to reassign a file to another owner. Access control lists (setfacl) grant per-user read and write rights without touching group membership.

  • ✗

    chmod u+rw file

    Why it's wrong here

    Setting the owner's own rw bits does nothing for a different user; the file has one owner, so this cannot grant access to anyone else. It is tempting because u+rw is the standard way to adjust owner permissions, and it would be correct when the target user already owns the file.

  • ✓

    setfacl -m u:username:rw file

    Why this is correct

    Using `setfacl -m u:username:rw file` writes a POSIX access control list entry granting that named user read and write permission, satisfying the stem's constraint of avoiding group changes or group membership edits. Standard Unix mode bits cannot grant per-user rights without altering owner, group or other classes, so ACLs are the only mechanism here.

  • ✗

    chgrp to user's primary group

    Why it's wrong here

    Changing the group alters the file's group ownership, which the scenario explicitly forbids, and the user still gains nothing unless already a member. It is tempting because group ownership is a legitimate access-control mechanism, and it would be correct when the user already belongs to the group being assigned.

Visual reference

Source Router + ACL permit 10.0.0.0/8 deny any Server 10.0.0.5 ✓ 192.168.1.1 ✗ dropped ACLs evaluate top-down; first match wins — implicit deny all at end

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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

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.