Reading the Security Permissions in Linux
For example: “rw- r-x r–“
- “rw-“: the first three characters `rw-`. This means that the owner of the file can “read” it (look at its contents) and “write” it (modify its contents). we cannot execute it because it is not a program but a text file.
- “r-x”: the second set of three characters “r-x”. This means that the members of the group can only read and execute the files.
- “r–“: The final three characters “r–” show the permissions allowed to other users who have a UserID on this Linux system. This means anyone in our Linux world can read but cannot modify or execute the files’ contents.
How to Set File Permissions in Linux
Linux is a multi-user operating system, so it has security to prevent people from accessing each other’s confidential files. When you execute a “ls” command, you are not given any information about the security of the files, because by default “ls” only lists the names of files. You can get more information by using an “option” with the “ls” command. All options start with a ‘-‘. For example, to execute “ls” with the “long listing” option, you would type ls -l . When you do so, each file will be listed on a separate line in a long format. There is an example in the window below.
Table of Content
- How to Check the Permission of Files in Linux
- What are the three permission groups in Linux?
- What are the three kinds of file permissions in Linux?
- Reading the Security Permissions in Linux
- How to Change Permissions in Linux
- The octal notations in Permissions in Linux
- How to Set File Permissions in Linux – FAQs