Hardware Reference
In-Depth Information
Octal representation of permissions
Permissions can also be described using an octal representation. This is a little more
complicated but very flexible.
Octal notation
Permissions
0
No permissions
1
Execute
2
Write
3
Write and execute
4
Read
5
Read and execute
6
Read and write
7
Read, write, and execute
To describe the permissions of a file, simply work out what permissions you want
to give. In the following example, we want the demo.txt file to have the following
permissions:
Permissions
Owner
Read and write
Group
Read only
All Users
No permissions
A demo of the permissions
To work out the permissions, we start with the owner and find the read and write
permissions. We then do the same for the group and all users' permissions. These
permissions work out as follows:
Permissions
Owner
6
Group
4
All Users
0
Octal permissions for the file
These permissions are put together to be 640 . The chmod command uses this
representation to set the permissions of the file or folder.
Search WWH ::




Custom Search