1.What is the difference between SUID and SGID?
Understanding special permission SUID
Understanding special permission SGID
2. What is Sticky Bit permission?
Understanding special permission Sticky Bit
3. What is umask?
In computing, umask is a command that determines the settings of a mask that controls which file permissions are set for files and directories when they are created. It also refers to a function that sets the mask, and to the mask itself, which is formally known as the file mode creation mask.
4. What is the default umask value for useradd command and where is it defined?
Default umask value for useradd: 077
5. Will you be able to cd into a directory with only read permission?
No, we need execute permission along with read to
cd into directory
6. What is -R argument used for along with chmod command?
To recursively apply the permission to all the directories including sub directories and files
7. How can you restrict a normal as well as root user from making any changes as well as deleting any file?
For more information follow the below link
Increase security using extended file attributes
8. What is the + plus sign you see at the end of permissions for some directories?
What is (+) plus sign in permission section for any directory/file in Linux?
9. How do you give acl in Linux?
Give individual permission using setfacl
10. What is the difference between small t and capital T when applying sticky bit permission?
Before applying Sticky Bit with executable permission
# chmod 775 /statusupdate # ls -l drwxrwxr-x. 3 root root 4096 Oct 17 07:07 statusupdate
After Sticky Bit with executable permission
# chmod 1775 /statusupdate # ls -l drwxrwxr-t. 3 root root 4096 Oct 17 07:07 statusupdate
Now as you see a small (t) since the directory had executable permission
Before applying sticky bit without executable permission
# chmod 774 /statusupdate # ls -l drwxrwxr--. 3 root root 4096 Oct 17 07:07 statusupdate
After Sticky Bit without executable permission
# chmod 1774 /statusupdate # ls -l drwxrwxr-T. 3 root root 4096 Oct 17 07:07 statusupdate
For more interview questions
9 thoughts on “Interview Questions on Linux Permissions with Answers”
Great information. Thanks for providing us such a useful information. Keep up the good work and continue providing us more quality information from time to time. Interview Preparation
Very very helpful information for all linux guys.. Thanks a lot and keep posted.
very help full information
MY FILE SYSTEM HAVING 777 PERMISSIONS, BUT IT SHOWS THAT READ ONLY. WHAT IS THE REASON AND SOLUTION
If your file permission is 777 but it show read only permission so there is a lack of package
You have install package of titanium may titanium is not confirmed but u go for it
I am unable to see the answer of this “Interview Questions on Linux Permissions with Answers” I can only see the question not the answer
Fixed it. Thanks for highlighting this.