18 | octal(777) chmod

Linux Command Line Tutorial


Everything is similar to the previous two videos in the series. The only difference is in this video we will learn how to use chmod with octal numbers.

In Octal

  • r = 4
  • w = 2
  • e = 1

This tutorial covers how to use the chmod command to change the access permission of files and directories.

In Linux, the file is associated with an owner and a group and assigned with permission access rights for three different classes of users:

  • The file owner
  • The group members
  • Others(everybody else)

File permissions can be changed. In order to do that we make use of chmod command.

There are three file permissions that apply to each class:

  • The read permission
  • The write permission
  • The execute permission
-rw-r--r-- 12 yash staff 128 Oct 2 12:31 myfile.txt
|[-][-][-]- [------] [---]
| | | | | | |
| | | | | | +-----------> 7. Group
| | | | | +-------------------> 6. Owner
| | | | +--------------------------> 5. Alternate Access Method
| | | +----------------------------> 4. Others Permissions
| | +-------------------------------> 3. Group Permissions
| +----------------------------------> 2. Owner Permissions
+------------------------------------> 1. File Type