Unix File Permission & Access Modes MCQs
File Permission & Access Modes MCQs : This section focuses on "File Permission And Access Modes" in unix. These Multiple Choice Questions (MCQ) should be practiced to improve the unix skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. The basic building blocks of Unix permissions are ____________.
A. read
B. write
C. execute
D. All of the above
View Answer
Ans : D
Explanation: The basic building blocks of Unix permissions are the read, write, and execute permissions.
2. How many types of permissions a file has in UNIX?
A. 2
B. 3
C. 4
D. 5
View Answer
Ans : B
Explanation: Every file in Unix has the following attributes : Owner, Group and other permissions.
3. What is group ownership?
A. group of users who can access the file
B. group of users who can create the file
C. group of users who can edit the file
D. group of users who can delete the file
View Answer
Ans : A
Explanation: In simple words, group ownership defines the group to which the file is accessible.
4. Which of the following is default permission set for ordinary files?
A. rw-rw-rw-
B. rwxrwxrwx
C. r-r-r-
D. rw-rw-rwx
View Answer
Ans : A
Explanation: The default permission set for an ordinary file is rw-rw-rw i.e. it is readable and writable by owner, group member and others.
5. Which command is used to change the owner of a file?
A. cowner
B. cgown
C. chown
D. chowner
View Answer
Ans : C
Explanation: The chown command stands for "change owner" and is used to change the owner of a file.
6. What is full form of SUID in File Permission?
A. Select User ID
B. Set User ID
C. Select Unique ID
D. Set Unique ID
View Answer
Ans : B
Explanation: Set User ID is full form of SUID.
7. Which of the following symbol is used with chmod to assign permission to a file?
A. -
B. +
C. =
D. *
View Answer
Ans : B
Explanation: "+" symbol will assign a permission and "-" symbol will remove a permission.
8. Like chmod, chown and chgrp can also use ___ option.
A. -R
B. -r
C. -x
D. -i
View Answer
Ans : A
Explanation: Like chmod, chown and chgrp use the -R option to perform their operations in a recursive manner.
9. Which number is assign to read permission in Octal Permission Representation?
A. 0
B. 1
C. 2
D. 4
View Answer
Ans : D
Explanation: 4 : Read permission : r--
10. Which file access mode grants the capability to modify, or remove the content of the file?
A. Read
B. Write
C. Execute
D. All of the above
View Answer
Ans : B
Explanation: Write : Grants the capability to modify, or remove the content of the file.
Discussion