Sweshi's Tutorials

Linux Permissions

Standard Permissions

NB: This tutorial has worked on Centos 6,7,8 and 9

There are two types of permissions on Linux which include standard and extended or special permissions. This tutorial focuses on standard permissions.


Linux standard permissions, also known as file permissions, dictate how files and directories can be accessed and modified by users and groups. These permissions are an essential part of Linux's security model. There are three primary types of permissions: read, write, and execute, and these permissions can be assigned to three entities: the file owner, the group owner, and others.

Here's a breakdown of the standard permissions:
  • Read (r)(4): This permission allows a user to view the contents of a file or list the contents of a directory. For a directory, read permission means the ability to read the names of files in the directory.
  • Write (w)(2): Write permission allows a user to modify the contents of a file or create, delete, and rename files in a directory. For a directory, write permission enables adding or removing files from it.
  • Execute (x) (1):Execute permission allows a user to execute a file if it's a program or script. For directories, execute permission allows a user to access files and subdirectories within that directory.
  • Each permission can be granted or denied for three categories of users:
    • Owner/User: The user who owns the file or directory.
    • Group: Users who belong to the group associated with the file or directory.
    • Others: Users who don't fall into the above two categories.

Permissions are represented by a series of letters or symbols. You can use this table below as a Standard Linux Permissions cheat sheet or chart:

Permission letter representation Numerical or Octal Representation
Read r 4
Write w 2
Execute x 1

The first three characters represent the owner's permissions.

The next three characters represent the group's permissions.

The last three characters represent others' permissions.

For instance, in the permission string -rw-r--r--, the file owner has read and write permissions, the group owner has read permission only, and others have read permission only.

You can modify permissions using the chmod command in Linux, which allows you to add or remove specific permissions for the owner, group, and others. This can also be represented as 644 where 6 is (rw )or 4+2 and 4 is (r--). For octal, note that we are adding for all the three i.e, the user, group and others in a single command.

Simplified view of linux standard permissions
This is a screenshot of Linux Permissions cheatsheet
Example of changing Linux permissions on an example.txt:

chmod u+x example.txt # Adds execute permission to the file for the owner

chmod g-w example.txt # Removes write permission for the group

chmod o+r example.txt # Adds read permission for others

More example of changing Linux standard permissions using octal(Numbers)
This is a screenshot of listing the directory contents with permissions

I use the command “ls -l” to give a long listing so that I can see the permissions for the files in the directory.

This is a screenshot of of the listing showing read,wrtie and execte for the user

The example.txt file has read,write and execute for the user, and only read for the group and others

This is a screenshot of changing linux permissions using numbers

I then change the permissions to 644 which represents (-rw-r—r--). Changing Linux permssions using numbers (octal) allows us to set the user, group and others all in one line.

This is a screenshot of the result of changing the linux permissions using numbers

We can see that the file permissions change accordingly. 644 is (-rw-r--r--) where 6 is (r+w) or (4+2),4 is (r) and 4 is (r).

This is a screenshot of linux permissions 777

We can add an rwx on all the three by giving 777. Each 7 is (rwx) when we add (4+2+1).

This is a screenshot of the result from changing the linux permissions to 777
More examples of changing Linux permissions using letter representations
This is a screenshot of changing the linux permissions using chmod ugo-x

Here I remove the execute permissions to the user, group and others. The minus (-) was used.

This is a screenshot of the removed permissions

We can see that the file has no execute on any of the three.

This is a screenshot of adding execute permissions to the user

Here I add execute Linux permission to the user only.

This is a screenshot of the result of adding Linux execute permissions to the user only

We can see that only the user has an execute permission added.


Video