LFCS Essential Commands Practice Question
A user reports that a shell script 'backup.sh' in /home/user/scripts fails to execute. What is the most likely cause?
⚠ Common exam trap
Many candidates assume a missing shebang (Option D) is the primary cause, but the LFCS exam tests that execute permission is the fundamental requirement for running any script directly.
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 script does not have execute permission for the user.
The most likely cause is that the script lacks execute permission for the user. In Linux, a file must have the execute bit set (e.g., `chmod +x backup.sh`) to be run as a script. Without it, the shell will refuse to execute the file, even if the user has read access and the script is syntactically correct.
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 is not in the user's PATH.
Why it's wrong here
If the user runs the script using ./backup.sh, PATH is irrelevant.
- ✓
The script does not have execute permission for the user.
Why this is correct
Missing execute permission is the most common cause of 'Permission denied' errors when running a script.
- ✗
The script must be owned by root.
Why it's wrong here
Ownership does not prevent execution; only permissions matter.
- ✗
The script does not have a shebang line (#!/bin/bash) at the top.
Why it's wrong here
A shebang line is not strictly required if the script is invoked with an interpreter, but its absence would not cause a 'Permission denied' error.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 507 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 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.