hardMultiple ChoiceObjective-mapped
XK0-006 Directory write permission Practice Question
A user cannot delete a file owned by another user on a shared filesystem. The file's permissions are 644, and the directory has permissions 777 with the sticky bit set. Which action would allow the user to delete the file?
⚠ Common exam trap
Candidates may fixate on file permissions or ownership, but deletion is governed by directory permissions. Even with write access, the sticky bit blocks deletion of other users' files. Only removing the sticky bit (B) enables deletion.
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
✓
Remove the sticky bit from the directory
The directory has permissions 777, meaning all users have read, write, and execute permissions. Write permission on the directory is required to delete files. However, the sticky bit prevents users from deleting files they do not own, even if they have write permission on the directory. Removing the sticky bit (option B) removes this restriction, allowing the user to delete the file.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Change the directory's group to include the user
Why it's wrong here
Changing the directory's group does not grant write permission to the user unless group permissions include write, which would be unusual without changing the mode. Moreover, the sticky bit still applies.
- ✓
Remove the sticky bit from the directory
Why this is correct
Removing the sticky bit allows users with write permission on the directory to delete any file, regardless of ownership.
- ✗
Add write permission for others on the file
Why it's wrong here
Adding write permission for others on the file does not affect deletion ability, as deletion requires directory write permission.
- ✗
Change the file's group to match the user's group
Why it's wrong here
Changing the file's group does not grant directory write permission and does not circumvent the sticky bit.
Go deeper
Related to this question
Learn chapter
Navigating the Filesystem
Key term
Sticky bit
The sticky bit is a special permission on Unix/Linux files and directories that restricts file deletion to the file owner, directory owner, or root user, even if others have write access.
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
This XK0-006 question is part of Courseiva's 979-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.