16 | file and chmod

Linux Command Line Tutorial



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


Leave a Reply

Your email address will not be published. Required fields are marked *