Linux MCQs – File Access Rights and Permissions – Part 2
Multiple choice questions and answers (MCQs) on Linux focuses on “Managing of users accounts and groups” to prepare for exams, interviews, and certifications, such as Redhat exam, CompTIA exam, Ubuntu / SuSE certification, LPI certification exam. These MCQs will easily prepare anyone to pass their Linux test.
1. Which command is used to assign read-write permission to the file owner?
A chmod a+r myfile
B chmod o+r myfile
C chmod u=rw myfile
D chmod og-r myfile
2. The following command:
$ chmod 4777 c.out
A will set the SUID bit of c.out file
B will only set the SUID bit of c.out file if the command is submitted by the root user
C invalid command
D will put the sticky bit of c.out file
4. The -rwxr-xr-t permissions represented by the following octal value.
A 0777
B 1755
C 1754
D 2754
5. The following command :
$ chmod o-w myfile
A defines the write permission for “others”.
B defines the write permission for “owner”.
C deletes the write permission for “others”.
D deletes write permissions
6. Which of these commands will set the permissions on the file “myfile”: read and write for the owner(user), read for the group and nothing for others?
A $ chmod 046 myfile
B $ chmod 640 myfile
C $ chmod 310 myfile
D $ chmod rw rw myfile
7. If you are a root user, how can you enable execution only for the owner of the file “myfile”?
A $ chmod +x myfile
B $ chmod u+x myfile
C $ chmod a+x myfile
D $ chmod U+X myfile
8. What does the following command “chmod + t”?
A wrong syntax
B defines the EUID
C defines the EGID
D set up the sticky bit
9. A user executes the following command :
$ chmod + x myfile.txt
Which of the following statements is true for the output of this command?
A The command results in an execution permission being added to the user who executed this command
B The command results in the execution permission being added for the owner of the file
C The command causes an error because the file is not an executable file
D The command results in the execution permission being added for all (user, group and others)
10. Which of the umask command parameters grant the right to run the newly created regular files by default?
A 222
B 111
C 000
D None of the above