Courseiva
Linux Fundamentals →hardMultiple Choice

GSEC Linux Fundamentals Practice Question

Exhibit

drwxr-xr-x 2 root root 4096 Oct 10 10:00 /opt/backup

Refer to the exhibit. A user attempts to delete a file located inside '/opt/backup', but the operation fails with a 'Permission denied' error. Given the directory permissions shown, what is the most likely cause?

⚠ Common exam trap

Test-takers frequently assume file deletion requires write permissions on the file itself, rather than recognizing that deleting or creating files depends entirely on parent directory 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

✓

The user lacks write permission on the /opt/backup directory.

The directory permissions 'drwxr-xr-x' indicate that the owner (root) has full control, while others have read and execute access. However, because the user is neither root nor the directory owner, they lack write permission (w) on the parent directory. In Linux, deleting a file requires write and execute permissions on the directory containing it, not just the file itself. This mechanism protects directory integrity from unauthorized modifications by non-privileged users.

Answer analysis

Option-by-option breakdown

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

  • ✗

    The user lacks the execute permission on the /opt/backup directory.

    Why it's wrong here

    The 'x' bit is present for others in the 'r-x' segment of the permissions string. Execute permission on a directory allows users to enter the directory and access files inside. Since the user can reach the file, the issue is not a lack of directory traversal rights.

  • ✓

    The user lacks write permission on the /opt/backup directory.

    Why this is correct

    Deleting a file requires the write permission on the parent directory because it involves removing a directory entry. The 'r-x' permissions for others demonstrate that the user does not have write access, which is the mandatory requirement for modifying the contents of a directory, including file deletion.

  • ✗

    The file inside the directory is owned by root and is immutable.

    Why it's wrong here

    While immutability would prevent deletion, the question focuses on the directory permissions. The 'Permission denied' message at the directory level typically triggers before the system even attempts to check the individual file's attributes. Directory write access is the primary gatekeeper for file removal operations in Linux filesystems.

  • ✗

    The user does not have the 'sudo' command available in their path.

    Why it's wrong here

    Sudo availability relates to privilege elevation, not standard filesystem access permissions. Even if the user had sudo, the current error stems from standard filesystem access controls. The root cause is the lack of write access on the container directory, which prevents the unlinking process required for file deletion.

About these practice questions

One of 351 original GSEC 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 →

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 GIAC exam blueprint

This GSEC practice question is part of Courseiva's free GIAC 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 GSEC exam.