Given the ls command output that is shown below, what command will permit only the user owner and members of the “staff” group to read or modify the testpcap file?
$ ls -l test -rw-r--r-- 1 jdoe staff 57 Nov 3 10:13 testpcap |
chmod 660 testpcap
chmod 550 testpcap
chmod o+rw testpcap
chmod staff+rw testpcap
Explanation & Hint:
To permit only the user owner (jdoe) and members of the “staff” group to read or modify the
This command sets the permissions as follows:
So, with these permissions, the user owner (jdoe) and members of the “staff” group can read and modify the file, while others have no access. |