CompTIA Server+ (SK0-005) — Question 95

A Linux administrator created a script that will run at startup. After successfully writing the script, the administrator received the following output when trying to execute the script: hash: ./startUp.sh: Permission denied
Which of the following commands would BEST resolve the error message?

Answer options

Correct answer: C

Explanation

The correct command is 'chmod +x startUp.sh' because it adds execute permissions to the script, allowing it to run. The other options either do not provide execute permissions or set permissions that are too restrictive for running the script.