The nine characters following the file type denote the permissions in three triplets. A permission can be r for read access, w for write access, and x for execute. You need the r permission to list (ls) the contents of a directory. You need the x permission to enter (cd) a directory. You need the w permission to create files in or remove files from a directory
We already know that the output of ls -l starts with ten characters for each file. This screenshot shows a regular file (because the first character is a – ).
Some example combinations on files and directories are seen in this screenshot. The name of the file explains the permissions.
To summarise, the first rwx triplet represents the permissions for the user owner. The second triplet corresponds to the group owner; it specifies permissions for all members of that group. The third triplet defines permissions for all other users that are not the user owner and are not a member of the group owner.
setting permissions (chmod)
Permissions can be changed with chmod. The first example gives the user owner execute permissions.
This example removes the group owners read permission.
This example removes the others read permission.
This example gives all of them the write permission.
You don’t even have to type the a.
You can also set explicit permissions.
Feel free to make any kind of combination.
Even fishy combinations are accepted by chmod.
You can check this article for setting more advanced file permissions
Latest posts by Ruwantha Nissanka (see all)
- 4 ways to hide your identity using linux - January 18, 2021
- How To Install Kali Linux in Virtualbox - December 31, 2020
- Kali Linux : The OS That Hackers Use - December 31, 2020
- How to monitor user activity in Linux with Acct - December 30, 2020
- Debsecan : You will not miss another security update - December 28, 2020