CompTIA PenTest+ (PT0-002) — Question 97
Which of the following commands will allow a penetration tester to permit a shell script to be executed by the file owner?
Answer options
- A. chmod u+x script.sh
- B. chmod u+e script.sh
- C. chmod o+e script.sh
- D. chmod o+x script.sh
Correct answer: A
Explanation
The correct answer is A, as 'chmod u+x script.sh' specifically adds execute permissions for the user who owns the file. Options B and C are incorrect because 'u+e' and 'o+e' are not valid permission options in the context of chmod. Option D grants execute permissions to others, not the file owner.