A systems administrator needs to change the permissions of the file /home/user/script.sh so that the owner can read, write, and execute; the group can read and execute; and others have no access. Which command accomplishes this?
Trap 1: chmod 755 /home/user/script.sh
755 gives rwx for owner, r-x for group, and r-x for others, but others should have no access.
Trap 2: chmod 770 /home/user/script.sh
770 gives rwx for owner, rwx for group, and --- for others, but group has write access which is not required.
Trap 3: chmod 741 /home/user/script.sh
741 gives rwx for owner, r-- for group, and --x for others, which does not match.
- A
chmod 755 /home/user/script.sh
Why wrong: 755 gives rwx for owner, r-x for group, and r-x for others, but others should have no access.
- B
chmod 750 /home/user/script.sh
750 gives rwx for owner, r-x for group, and --- for others, matching the requirement.
- C
chmod 770 /home/user/script.sh
Why wrong: 770 gives rwx for owner, rwx for group, and --- for others, but group has write access which is not required.
- D
chmod 741 /home/user/script.sh
Why wrong: 741 gives rwx for owner, r-- for group, and --x for others, which does not match.