Basic Directory Access - Quiz Explanation
The correct answers are indicated below, along with the text that explains the correct answers.
1.
What command is used to change a file’s group?
Please select the best answer.
A.
chown
B.
ls
C.
chgrp
D.
su
The correct answer is C.
The
chown
command changes a file’s ownership. The
ls
command lists files in the current directory. The
su
command allows a user to become a superuser. Generally, only the superuser may change file ownership.
2.
What does the
–R
option do?
Please select the best answer.
A.
Allows ownership of an entire directory tree to be changed
B.
Allows ownership of a file to be changed to another group
C.
Allows ownership of a file to be changed to another owner
D.
Allows ownership to be transferred to the superuser
The correct answer is A.
This option is used with the
chgrp
and
chown
commands.
3.
What command shows the state of permission bits for files and directories?
Please select the best answer.
A.
touch
B.
chown –R
C.
ls –l
D.
chgrp –R
The correct answer is C.
The permission bits are listed as a file type followed by the 9 access permissions bits—read, write, and execute permissions for users, groups, and other.