Question 570
A technician working on a classroom Linux system finds: A learner tries to execute a simple shell script stored with mode -rw-r--r-- by typing ./hello.sh and receives permission denied. Which specific action BEST resolves the stated problem?
Explanation
Correct Answer
Add the appropriate execute bit, such as chmod u+x hello.sh, when direct execution is intended. This directly addresses the reported situation. Why it works: The Linux filesystem execute permission controls whether an ordinary file may be launched as a program. Acceptance evidence: The script runs for its owner after the change, while nonowners retain their previous permission constraints.
Incorrect Answers
The proposed action focuses on a control governed by: Interpret the owner/group/other permission triplets and recognize the group has read but not write permission. In this question the binding condition is: Add the appropriate execute bit, such as chmod u+x hello.sh, when direct execution is intended. Applying “Add the appropriate execute bit, such as chmod u+x hello.sh, when direct execution is intended” addresses that specific cause instead.
“Use chown to set the intended file or directory owner where authorized, preserving reviewed permissions” acts on a neighboring technical dependency: Use chown to set the intended file or directory owner where authorized, preserving reviewed permissions. It does not resolve the stated condition, whose causal mechanism is: Add the appropriate execute bit, such as chmod u+x hello.sh, when direct execution is intended. The required action is “Add the appropriate execute bit, such as chmod u+x hello.sh, when direct execution is intended”.
This option would change the part of the system described by: Identify the specific required access and apply narrowly scoped ownership or group permissions instead of universal recursive 777. The reported behavior instead arises because add the appropriate execute bit, such as chmod u+x hello.sh, when direct execution is intended. The direct remediation is “Add the appropriate execute bit, such as chmod u+x hello.sh, when direct execution is intended”.