easyMultiple ChoiceObjective-mapped
XK0-006 A user cannot access a file Practice Question
A user cannot access a file. The file has permissions 640 and is owned by root:root. The user is not root and not in the root group. Which command should the administrator use to allow the user to read the file?
⚠ Common exam trap
The trap here is that candidates may overcomplicate the solution by choosing `setfacl` or `chown` when a simple `chmod` on the 'others' class is the correct and most efficient fix for a user who is neither the owner nor a group member.
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
✓
chmod o+r file
The file has permissions 640, which means the owner (root) has read/write, the group (root) has read, and others have no permissions. Since the user is not root and not in the root group, they fall into the 'others' category. The command `chmod o+r file` adds read permission for others, allowing the user to read the file without changing ownership or group membership.
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 o+r file
Why this is correct
Correct: Adds read permission for others.
- ✗
chgrp user file
Why it's wrong here
Changes group, but user may not be in that group.
- ✗
setfacl -m u:user:r file
Why it's wrong here
Although `setfacl` can grant read access to a specific user via an ACL entry, this command fails because the underlying filesystem may not be mounted with the `acl` option, a prerequisite for ACL functionality. The default approach using standard Unix permissions—either changing the file’s group to one the user belongs to or adding read for others—ensures portability without filesystem dependencies. The `setfacl` option is tempting because it offers fine-grained control without altering group membership or world-readability, and would be correct if the filesystem explicitly supports ACLs and is mounted accordingly.
- ✗
chown user file
Why it's wrong here
Changes ownership to user, but does not grant read to others.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
chmod
chmod is a command in Linux and Unix-like operating systems used to change the permissions (read, write, execute) of a file or directory.
Key term
User
A user is any person, system, or device that interacts with an IT service, resource, or identity system, typically authenticated through credentials and authorized to perform specific actions.
About these practice questions
One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.