Security

The script deploy.sh currently has mode rw-r--r--. An administrator must make it executable for its owner and group and remove all access for other users, while leaving the existing read and write bits for owner and group untouched. Which command does this?

Show the answer

Correct answerB. chmod ug+x,o-r deploy.sh

Using + adds execute for owner and group, and o-r removes read from others, giving rwxr-x---. The ug=x form is tempting but the = operator replaces the existing bits, which would remove the read and write permissions.