CompTIACompTIA
XK0-005 · Question #385
XK0-005 Question #385: Real Exam Question with Answer & Explanation
The correct answer is B: Chmod u+x script,sh. The administrator needs to grant execute permissions specifically to the owner of a script.
System Management
Question
A Linux administrator needs to change the permission on a script so that the owner has permission to execute. Which of the following BEST accomplishes this task?
Options
- AChmod ug=script,sh
- BChmod u+x script,sh
- CChmod -x script,sh
- DChmod 0644 script,sh
Explanation
The administrator needs to grant execute permissions specifically to the owner of a script.
Common mistakes.
- A. The
ug=script.shsyntax is incorrect for specifying permissions withinchmod. - C.
Chmod -xremoves execute permissions for all users, which is the opposite of the desired outcome. - D.
Chmod 0644sets read/write for the owner but explicitly does not include execute permission.
Concept tested. Linux file permissions (chmod symbolic mode)
Reference. https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html
Topics
#Linux Permissions#chmod command#File Execution#Symbolic Permissions
Community Discussion
No community discussion yet for this question.