EX200 Essential Tools Practice Question
A user reports that a script in their home directory fails to execute. The script has permissions -rw-r--r-- and is owned by the user. Which command will allow execution for the owner?
⚠ Common exam trap
Red Hat often tests the distinction between adding execute permission for the owner only versus adding it for all users, and the trap here is that candidates might choose `a+x` (option B) thinking it is the simplest solution, but the question explicitly asks for execution for the owner.
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 u+x script.sh
The script currently has permissions `-rw-r--r--`, meaning the owner has read and write but not execute. To allow the owner to execute it, you need to add the execute permission for the owner only. `chmod u+x script.sh` adds the execute bit for the user (owner) without affecting group or others, which is the precise requirement.
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 u+r script.sh
Why it's wrong here
The chmod u+r command only grants the owning user read permission on script.sh. While reading the file might allow someone to inspect its contents or run it with an explicit interpreter such as bash script.sh, it does not set the execute bit. If you attempt to execute the script directly as ./script.sh, the kernel checks for execute permission and rejects it with 'Permission denied' even though the file is readable. Thus, it fails to resolve the reported problem.
- ✗
chmod a+x script.sh
Why it's wrong here
chmod a+x sets the execute bit for the user, group, and others, so it would actually allow the owner to run the script directly. However, it is overly permissive for a user-specific script in a home directory, granting execution rights to every system user unnecessarily. The principle of least privilege dictates that only the owner needs the execute bit, so this command works but is not the correct or minimal fix. Security-conscious administrators would avoid extending execute permissions to all users, making chmod u+x the proper choice.
- ✓
chmod u+x script.sh
Why this is correct
chmod u+x is the precise fix because it sets the execute permission for the owner (the user who owns the file) without altering permissions for anyone else. On Linux, a file must have its execute bit(s) set before the kernel will allow it to be run directly via a path like ./script.sh. Since the script's owner is the user who is running it, this user only needs owner execute permission, not group or other. This follows the minimal privilege principle and is the correct, targeted solution.
- ✗
chmod u-x script.sh
Why it's wrong here
chmod u-x explicitly removes the execute bit from the owner's permission set. If the user's script was previously failing because it lacked execute permission, this command would make the situation worse by ensuring the owner definitely cannot execute it. It would guarantee a 'Permission denied' error for direct execution, and no other circumstances would change the outcome. Rather than fixing the reported failure, this command propagates or deepens it.
Go deeper
Related to this question
About these practice questions
Courseiva writes every EX200 question from scratch — 427 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.