This LFCS practice question tests your understanding of essential commands. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
$ ls -l /usr/local/bin/backup.sh
-rwx------ 1 root root 1024 Jan 1 12:00 /usr/local/bin/backup.sh
$ sudo -u backup /usr/local/bin/backup.sh
sudo: unable to execute /usr/local/bin/backup.sh: Permission denied
$ id backup
uid=1003(backup) gid=1003(backup) groups=1003(backup)
The backup script fails to run as user 'backup' with sudo. What is the issue?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The script does not have execute permission for the 'backup' user.
Option B is correct because for a script to be executed via sudo, the user (backup) must have execute permission on the script file. Even if sudo is configured to allow the user to run the script, the operating system enforces file permission checks at execution time. Without the execute bit set for the backup user (or for others, depending on the sudo runas context), the kernel will refuse to execve() the script, resulting in a 'Permission denied' error.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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 script has a restrictive umask.
Why it's wrong here
Umask affects new files, not existing permissions.
✓
The script does not have execute permission for the 'backup' user.
Why this is correct
Only root has execute permission.
Related concept
Read the scenario before looking for a memorised answer.
✗
The script is not owned by 'backup'.
Why it's wrong here
Ownership is not the issue; execute permission is missing.
✗
The 'backup' user is not in the sudoers file.
Why it's wrong here
sudo is working, but the script is not executable.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often assume sudo bypasses all file permission checks, but in reality, sudo only bypasses the permission to run the command as another user—the kernel still enforces file execute permissions on the target script.
Detailed technical explanation
How to think about this question
Under the hood, when sudo executes a script, it uses the execve() system call, which performs a permission check based on the file's inode permissions (the execute bit) for the effective user ID. Even if sudo itself has the authority to run the script, the kernel's security model requires that the file be executable by the user ID that sudo switches to (or by 'others' if the script is world-executable). A common real-world scenario is when a backup script is created with restrictive permissions (e.g., 600) and then sudo is configured to allow the backup user to run it; the fix is to add execute permission (e.g., chmod +x script.sh) or adjust the sudoers entry to use 'sudo -u backup /bin/bash /path/to/script.sh'.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A network engineer segments a warehouse floor into three subnets: 20 scanners, 5 printers, and 2 management hosts. Picking the wrong mask wastes addresses or leaves too few usable hosts. Exam questions test whether you can apply CIDR notation, calculate block size, and identify the correct usable-host range for a given prefix.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Essential Commands — This question tests Essential Commands — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The script does not have execute permission for the 'backup' user. — Option B is correct because for a script to be executed via sudo, the user (backup) must have execute permission on the script file. Even if sudo is configured to allow the user to run the script, the operating system enforces file permission checks at execution time. Without the execute bit set for the backup user (or for others, depending on the sudo runas context), the kernel will refuse to execve() the script, resulting in a 'Permission denied' error.
What should I do if I get this LFCS question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.