ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 138 - SK0-005 discussion

Report
Export

A Linux administrator created a script that will run at startup. After successfully writing the script, the administrator received me following output when trying to execute the script:

Bash ./startup,sh:Permission denied

Which of the following commands would BEST resolve the error message?

A.
Chmod +w startup.sh
Answers
A.
Chmod +w startup.sh
B.
Chmod 444 startup.sh
Answers
B.
Chmod 444 startup.sh
C.
Chmod+x startup.sh
Answers
C.
Chmod+x startup.sh
D.
Chmod 466 startUp,sh
Answers
D.
Chmod 466 startUp,sh
Suggested answer: C

Explanation:

This is the command that would best resolve the error message “Bash ./startup.sh: Permission denied” when trying to execute a script on Linux. Chmod is a command that changes the permissions of files or directories on Linux. +x is an option that adds the execute permission to the file or directory for the owner, group, and others. startup.sh is the name of the script file that needs to be executed. By running chmod +x startup.sh, the technician grants execute permission to the script file and allows it to be run by any user. Chmod +w startup.sh would add write permission to the file, but not execute permission. Chmod 444 startup.sh would set read-only permission for all users, but not execute permission. Chmod 466 startup.sh would set read and write permission for the owner and write-only permission for group and others, but not execute permission. Reference:

https://www.howtogeek.com/437958/how-to-use-the-chmod-command-on-linux

asked 02/10/2024
EMELINE LE QUENTREC
29 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first