August 2018
Intermediate to advanced
482 pages
12h 44m
English
Permissions can be set with chmod using numbers also, known as Octal representation. We can edit permissions for the owner, group, and others, all at the same time using this method. The syntax of the command is as follows:
chmod xxx file/directory
Here, xxx refers to a three-digit number from 1-7. The first digit refers to the owner's permission, the second represents group, and the third digit refers to the permissions of others.
When we use octal representation r, w, and x permissions have specific number values:
So, if we want to add permission to read and execute, it will be calculated as follows:
Similarly, permission to read, write, and execute is calculated as follows:
Read now
Unlock full access