When CompTIA released the objectives for Network+ N10-006 they added Octal to the “Numbering Systems” sub-objective. Some were perplexed by this addition. Did this mean instructors needed to teach octal numbering theory, and that students would have to know how to convert octal numbers, as they do for binary, decimal, and hexadecimal? Thankfully, no.
Octal was added to encompass how file permissions in Linux and Unix systems can be expressed. This particular use of octal is just for expressing in numeric format each of the 8 possible file permissions in Linux. In this case, it is not a number that is converted to decimal or binary for some other purpose.
The Linux file system permissions are built upon 3 states: Read (r), Write (w), and Execute (x). These 3 permissions are granted for the owner of the object, the group the owner belongs to, and all others, in that order. An example would look like this:
-rwxrw-r– robotparts.txt
This example shows that for the file, robotparts.txt, the owner has full control, the group can read and write (but not execute), and all others have read access only. These 10 positions of file permission are broken out in the table below:
Changing File Permissions
The chmod command is used to change file and folder permissions. An example using chmod would look like this: chmod -x Robotparts.txt. This command removes the execute permission for the owner.
The 3 basic permissions can be combined to create 8 different specific permissions. For example, rwx means “full control”. Furthermore, each basic permission is given a numeric value. Execute has a value of 1, Write a value of 2, and Read a value of 4. The 8 different permission combinations can thus be assigned a numeric value by simply adding the values of the component basic permissions. Thus, “full control” has a value of 7 (4+2+1). Since there are only 8 possible values, this numeric expression of file permissions would be considered an octal number. The table below shows the 8 possible combinations of the basic permissions and the resulting numeric value for that permission.
For the example above, the octal value for the file permissions for the robotparts.txt file is 764. The chmod command can be used with the numeric values as well. For example, chmod 700 Robotparts.txt would give the owner full control and remove permissions for everyone else.
The website http://permissions-calculator.org can show you the octal values for various combinations of user, group, and all other permissions.
While file permissions is an objective item for the Security+ class, and students for that exam are expected to be able to decode both the octal and character file permissions, the network+ students just have to know what octal is used for.