XK0-006 · Question #62
A user on a Linux VM is running /work/test.sh Bash script and receives the following error: bash: /work/test.sh: Permission denied After further investigation, the user receives the following…
The correct answer is A. mount -o remount,exec /work. The script /work/test.sh already has execute permissions (-rwxr--r--), but the filesystem is mounted with the noexec option, which prevents execution of binaries and scripts. Remounting the filesystem with the exec option allows execution of the script.
Question
A user on a Linux VM is running /work/test.sh Bash script and receives the following error:
bash: /work/test.sh: Permission denied After further investigation, the user receives the following outputs:
Which of the following commands should a systems administrator run to fix the issue?
Exhibit
Options
- Amount -o remount,exec /work
- Bmount -o remount,suid /work
- Cchmod g+x /work/test.sh
- Dchmod o+x /work/test.sh
How the community answered
(25 responses)- A56% (14)
- B4% (1)
- C24% (6)
- D16% (4)
Explanation
The script /work/test.sh already has execute permissions (-rwxr--r--), but the filesystem is mounted with the noexec option, which prevents execution of binaries and scripts. Remounting the filesystem with the exec option allows execution of the script.
Topics
Community Discussion
No community discussion yet for this question.
