A user reports that a script fails with 'Permission denied' when executed. The script has permissions -rw-r--r-- and is owned by the user. Which command should the user run to make the script executable for the owner only?
Trap 1: chmod u+s script.sh
Sets the setuid bit, not execute.
Trap 2: chown :users script.sh
Changes group ownership, not permissions.
Trap 3: chmod +x script.sh
Adds execute for all users, not just owner.
- A
chmod u+s script.sh
Why wrong: Sets the setuid bit, not execute.
- B
chmod u+x script.sh
Adds execute permission for the owner only.
- C
chown :users script.sh
Why wrong: Changes group ownership, not permissions.
- D
chmod +x script.sh
Why wrong: Adds execute for all users, not just owner.