Courseiva
hardMultiple Choice

XK0-006 Practice Question: A Linux administrator needs to ensure that only…

A Linux administrator needs to ensure that only the root user can run commands in the /usr/local/bin/scripts directory. Which command should be used to set the appropriate permissions?

⚠ Common exam trap

Watch out — candidates often choose 755 or 750 as 'standard' permissions for directories, forgetting that the requirement explicitly restricts access to only root, not to any group or other users.

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 700 /usr/local/bin/scripts

The requirement is that only the root user can run commands in the directory. Permission 700 (owner: rwx, group: ---, others: ---) grants full access exclusively to the owner (root), while denying all access to the group and others. This matches the requirement precisely.

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 750 /usr/local/bin/scripts

    Why it's wrong here

    chmod 750 grants the group read and execute, so any group member can run the scripts, not only root. Restricting execution to root alone requires 700. The 750 mode is correct when a trusted group such as admins must also execute the scripts.

  • ✓

    chmod 700 /usr/local/bin/scripts

    Why this is correct

    Mode 700 grants read, write and execute to the owner (root) while denying all access to group and others, satisfying the requirement that only root can run scripts in that directory. It also preserves the execute bit needed to traverse and run files.

  • ✗

    chmod 755 /usr/local/bin/scripts

    Why it's wrong here

    Mode 755 grants execute and read to group and other, so any user could run the scripts, contradicting the root-only requirement. It is tempting because 755 is the standard mode for executable directories, and would be correct if all users needed to run the scripts while only root could modify them.

  • ✗

    chmod 770 /usr/local/bin/scripts

    Why it's wrong here

    Mode 770 grants execute to the owning group as well as root, so group members could run the scripts, contradicting the root-only requirement. It is tempting because 770 is the standard mode for a shared directory restricted to an owner and group, and would be correct if a specific team needed execute access.

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.