hardMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A security audit reveals that a server's…
A security audit reveals that a server's /etc/shadow file is readable by all users. Which command would correctly fix the permissions?
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 600 /etc/shadow
The correct command is 'chmod 600 /etc/shadow' (option B). The /etc/shadow file should only be readable by the root user, as it contains password hashes. Permission 600 grants read and write access only to the owner (root). Option A (644) would allow world read access, which is insecure. Option C (640) would allow group read access, which is also not recommended. Option D includes an unnecessary chown command and uses 640 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.
- ✗
chmod 644 /etc/shadow
Why it's wrong here
This allows world read access, which is insecure.
- ✓
chmod 600 /etc/shadow
Why this is correct
This restricts read and write access to root only.
- ✗
chmod 640 /etc/shadow
Why it's wrong here
This allows group read access, which may be too permissive.
- ✗
chmod 640 /etc/shadow && chown root:shadow
Why it's wrong here
The chown is unnecessary; the fix is simply setting proper permissions.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
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.
Key term
chown
chown is a Linux/Unix command used to change the owner and group associated with a file or directory.
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.