ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 319 - XK0-005 discussion

Report
Export

A Linux systems administrator is trying to execute a particular shell script on a server. The administrator reviews the following outputs:

shell

$ ./startup.sh

bash: ./startup.sh: Permission denied

$ ls -l startup.sh

-rw-rw-r-- 1 companyabc companyabc 18 October 15:35 startup.sh

Which of the following commands should the administrator use to allow the script to run?

A.

chown root startup.sh

Answers
A.

chown root startup.sh

B.

chmod 750 startup.sh

Answers
B.

chmod 750 startup.sh

C.

chmod -x startup.sh

Answers
C.

chmod -x startup.sh

D.

chmod 400 startup.sh

Answers
D.

chmod 400 startup.sh

Suggested answer: B

Explanation:

The script is missing the execute permission. Using chmod 750 startup.sh adds execute permissions for the owner and grants read and execute permissions for the group, allowing the script to run. Without execute permissions, the shell cannot run the script.

asked 09/10/2024
Kelvin Galabuzi
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first