Home »
Aptitude Questions and Answers »
Linux Aptitude Questions and Answers
Linux File Permissions Commands Aptitude Questions and Answers
Linux File Permissions Commands Aptitude Questions and Answers: This section contains aptitude questions and answers on Linux File Permissions Commands.
Submitted by Nidhi, on May 20, 2020
This section contains Aptitude Questions and Answers on File Permissions Commands.
1) Which of the following are the types of file owners in the Linux Operating System?
- User
- Group
- Other
- None of the above
Options:
- A and B
- C and D
- A, B, and C
- D
Correct answer: 3
A, B, and C
User, Owner, and Other are the types of file owners used in the Linux operating system.
2) Which exact command is used to see the permissions of a file in the Linux operating system?
- perms
- file -perm
- ls -l
- ls -perm
Correct answer: 3
ls -l
The ls -l command is used to display permissions and other information regarding files and directories.
3) How can we differentiate between file and directory from the output of ls command?
- Directories are mentioned in capital letters in the output of ls command.
- The d character is used before permissions in the output of ls command.
- Both of the above
- None of the above
Correct answer: 2
The d character is used before permissions in the output of ls command.
The d character is used before permissions in the output of ls command.
4) Which of the following type of permissions are used for files and directories in the Linux Operating System?
- Read
- Write
- Execute
- All of the above
Options:
- A and B
- B and C
- A and C
- D
Correct answer: 4
D
There are read, write, and execute permission can be assigned to the files and directories.
5) Which of the following character is used for "execute" permissions in the Linux operating system?
- e
- x
- E
- None
Correct answer: 2
x
The x character is used for "execute" permissions in the Linux operating system.
6) Can we assign permissions to all types of owners of a specified file in a single command?
- Yes
- No
Correct answer: 1
Yes
Yes, we can assign permissions to all types of owners of a specified file in a single command.
7) Which of the following command is used to change the permissions of a file?
- chperm
- chmod
- chown
- permission
Correct answer: 2
chmod
The chmod command is used to assign and change the permission of a file.
8) Which of the following command is used to change the group owner of a file?
- group
- chgroup
- chown
- chgrp
Correct answer: 4
chgrp
The chgrp is used to change the group owner of a file.
9) Which of the following command is used to change the owner of a file?
- owner
- chgown
- chown
- changeowner
Correct answer: 3
chown
The chown is used to change the owner of a file.
10) Which of the following character is used to identify the symbolic link file in the output of ls command?
- s
- c
- l
- _
Correct answer: 3
l
The l character is used to identify the symbolic link file in the output of the ls command.
11) Which of the following modes are used to assign permission to the file in the Linux operating system?
- Numeric mode
- Symbolic mode
- Both
- None
Correct answer: 3
Both
In the Linux operating system, both numeric and symbolic modes are used to assign permission to the file.
12) Which of the following number is used for "read" permission in the Linux operating system?
- 4
- 2
- 1
- 0
Correct answer: 1
4
The number 4 is used for "read" permission.
13) If we want to assign read and execute permission to the file then which number is used in the chmod command to assign permission?
- 5
- 6
- 7
- 3
Correct answer: 1
5
The number 5 is used in chmod command to assign read and execute permission, because here we use 4 for "read" and 1 for "execute" then (4+1) that is 5, is used for "read" and "execute" permission.
14) Which exact command is used to assign all read, write and execute permission to all owners of a file?
- chmod 7 <file name>
- chmod 777 <file name>
- chown 777 <file name>
- chgrp 777 <file name>
Correct answer: 2
chmod 777 <file name>
15) Which of the following notations are correct for owners of a file?
- a
- o
- u
- g
Options:
- A and B
- A, B, and C
- A, B, and D
- A, B, C, and D
Correct answer: 4
A, B, C, and D
All given options are correct notations are used for owners of a file, here u for the user, g for group, o for others, and a for all.
16) Which of the following operator is used to set and override the permission of a file in chmod command?
- +
- =
- *
- -
Correct answer: 2
=
Here, = operator is used to set and override the permission of a file in the chmod command.
17) Which exact command is used, when we want to add execute permission to all owners of the file?
- chmod all x <file name>
- chmod ax <file name>
- chmod a+x <file name>
- None of the above
Correct answer: 3
chmod a+x <file name>
18) Which option is used to assign permission to directory recursively?
- -r
- -R
- -REC
- -rec
Correct answer: 2
-R
The -R option is used to assign permission to directory recursively.
19) Which exact command is used, remove write, and execute permission from a file?
- chmod w-x <file name>
- chmod x-w <file name>
- chmod –we <file name>
- chmod –wx <file name>
Correct answer: 4
chmod –wx <file name>
20) Which command is used to see what permissions will be provided to the newly created file by default?
- default
- unmask
- permissions
- defperm
Correct answer: 2
unmask
The unmask command is used to see what permissions will be provided to the newly created file by default.