LPI
010-160 · Question #24
010-160 Question #24: Real Exam Question with Answer & Explanation
Sign in or unlock 010-160 to reveal the answer and full explanation for question #24. The question stem and answer options stay visible for context.
Security and File Permissions
Question
The current directory contains the following file:
-rw-r--r-- 1 root exec 24551 Apr 2 12:36 test.sh
The file contains a valid shell script, but executing this file using ./test.sh leads to this error:
bash: ./test.sh: Permission denied
What should be done in order to successfully execute the script?
Options
- AThe file's extension should be changed from .sh to .bin.
- BThe execute bit should be set in the file's permissions.
- CThe user executing the script should be added to the exec group.
- DThe SUID bit should be set in the file's permissions.
- EThe script should be run using #!/test.sh instead of ./test.sh.
Unlock 010-160 to see the answer
You've previewed enough free 010-160 questions. Unlock 010-160 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#file permissions#execute bit#chmod#shell scripts