CHMOD Explained

Understand Linux file permissions the simple and visual way

Interactive chmod Calculator

Select permissions for Owner, Group, and Public:

Owner

Group

Public

What is CHMOD?

CHMOD stands for Change Mode. It is a Linux/Unix command used to change the file system permissions for files and directories. Permissions determine who can read, write, or execute a file.

Every file and folder has three types of permissions for three categories of users:

Understanding File Permissions

Permissions are represented in two ways:

  1. Symbolic Notation: Example: rw-r--r--
    - First three characters are for the owner, next three for the group, and last three for others.
  2. Numeric/Octal Notation: Example: 644
    Each permission type has a numeric value: Read = 4, Write = 2, Execute = 1. The sum gives the octal digit.

How to Use CHMOD

Basic syntax:

chmod [options] permissions filename

Examples:

Allow owner to read/write, others read only

chmod 644 file.txt

Symbolic: rw-r--r--

Allow everyone to read, write, and execute

chmod 777 script.sh

Symbolic: rwxrwxrwx

Allow owner full access, group execute only

chmod 751 program

Symbolic: rwxr-x--x

Common CHMOD Use Cases

Visual Permission Cheat Sheet

Numeric → Symbolic

0 = ---  
1 = --x  
2 = -w-  
3 = -wx  
4 = r--  
5 = r-x  
6 = rw-  
7 = rwx

Quick CHMOD Tips

  • Use +x to make a file executable.
  • Use -w to remove write access.
  • Use u/g/o to modify Owner/Group/Other permissions individually.