PT0-002 · Question #132
Which of the following commands will allow a penetration tester to permit a shell script to be executed by the file owner?
The correct answer is A. chmod u+x script.sh. In Linux/Unix file permissions, chmod uses symbolic notation where u = user (owner), g = group, o = others, and a = all. The permission types are r (read), w (write), and x (execute). The + operator adds a permission. Therefore, chmod u+x script.sh adds execute (x) permission…
Question
Which of the following commands will allow a penetration tester to permit a shell script to be executed by the file owner?
Exhibit
Options
- Achmod u+x script.sh
- Bchmod u+e script.sh
- Cchmod o+e script.sh
- Dchmod o+x script.sh
How the community answered
(53 responses)- A94% (50)
- B4% (2)
- D2% (1)
Explanation
In Linux/Unix file permissions, chmod uses symbolic notation where u = user (owner), g = group, o = others, and a = all. The permission types are r (read), w (write), and x (execute). The + operator adds a permission. Therefore, chmod u+x script.sh adds execute (x) permission for the file owner (u). Option B and C use e, which is not a valid permission symbol. Option D (chmod o+x) would grant execute permission to others, not the file owner.
Topics
Community Discussion
No community discussion yet for this question.
