Interactive chmod Calculator
Select permissions for Owner, Group, and 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:
- Owner/User: The person who owns the file.
- Group: Users who are part of the file’s group.
- Others/Public: All other users on the system.
Understanding File Permissions
Permissions are represented in two ways:
-
Symbolic Notation: Example:
rw-r--r--
- First three characters are for the owner, next three for the group, and last three for others. -
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
- Making a script executable:
chmod +x script.sh - Restricting access to a file:
chmod 600 secret.txt - Setting default permissions for a web directory:
chmod 755 /var/www/html - Granting group members write permission:
chmod g+w file.txt
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
+xto make a file executable. - Use
-wto remove write access. - Use
u/g/oto modify Owner/Group/Other permissions individually.