Courseiva
hardMultiple Choice

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

    Directory group membership does not override the sticky bit, which restricts deletion to the file's owner, the directory's owner, or root. It is tempting because group ownership normally governs directory write access, but here the sticky bit is the blocking mechanism, so the user needs ownership or root privileges.

  • ✓

    Remove the sticky bit from the directory

    Why this is correct

    The sticky bit on a directory restricts deletion to the file's owner, directory owner, or root. Removing it lets any user with write permission on the 777 directory unlink the file, satisfying the requirement to allow deletion of another user's file.

  • ✗

    Add write permission for others on the file

    Why it's wrong here

    File write permission governs content modification, not directory entry removal; deletion depends on write and execute permission on the containing directory. The sticky bit restricts deletion to the file owner, directory owner or root, so others cannot remove it regardless of file mode. Adding write permission suits editing file contents, not unlinking.

  • ✗

    Change the file's group to match the user's group

    Why it's wrong here

    Changing the file's group does not grant delete rights; deletion depends on write permission on the containing directory, not file ownership or group. The sticky bit restricts deletion to the file owner, directory owner or root, so ownership or directory permissions must change.

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 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.