Examine the following commands:
# groupadd project
# mkdir /usr/share/project
# chown –R root.project /usr/share/project
# qpasswd –a scott project
# qpasswd –a foo project
# chmod 2775 /usr/share/project
Based on the commands, which statement is correct?
A.
Any new file created in the /usr/share/project folder by user scott will not be possible for foo to
modify it.
B.
All members of the project group need the administrator’s help to change the file permission
every time users write new files in the /usr/share/project folder.
C.
Files created by all members of the project group in the /usr/share/project folder will get the
same group permission as the folder itself.
D.
The chmod command can only take a tree-digit argument.
Explanation:
*Apermission of “2755” for a directory means that everyone has read and execute
permission, while the file owner and members of the file’s group additionally have write
permission. And any files or subdirectories created in that directory will inherit the parent
directory’s group id.
Incorrect:
Not D: chmod 2775 is a valid command.
The explanation is correct in what it says but the question says 2775 not 2755. So the chmod command would give read, write, and execute permissions to the group as well as the owner. So the answer is C
[scott@OEL65 project]$ id
uid=501(scott) gid=502(scott) groups=502(scott),501(project)
[scott@OEL65 project]$ pwd
/usr/share/project
[scott@OEL65 project]$ vi test2
[scott@OEL65 project]$ ls -la
drwxrwsr-x 2 root project 4096 Nov 14 18:31 .
drwxr-xr-x. 149 root root 4096 Nov 14 18:29 ..
-rw-rw-r– 1 scott project 40 Nov 14 18:31 test2
[scott@OEL65 share]$ ls -la project
drwxrwsr-x 2 root project 4096 Nov 14 18:31 .
drwxr-xr-x. 149 root root 4096 Nov 14 18:29 ..
-rw-rw-r– 1 scott project 40 Nov 14 18:31 test2
As above info you can figure out the correct answer is C that means umask is 0002.
Answer C
Collaborative group