Chmod Calculator

Free chmod calculator. Toggle read, write, execute for owner, group, and others - get both octal (755, 644) and symbolic chmod commands instantly. Linux and Unix compatible.

Symbolicrwxr-xr-x
Read(4)
Write(2)
Execute(1)
Owner
Group
Others

Quick presets:

Chmod Command (Octal)

chmod 755 filename

Chmod Command (Symbolic)

chmod u=rwx,g=rx,o=rx filename

Common Chmod Permissions Reference

The most commonly used chmod permission combinations for Linux servers, web hosting, and development environments.

Octal
Symbolic
Description
Common Use
rwxrwxrwx
Full access for everyone
Development only - never use in production
rwxr-xr-x
Owner: full, Group/Others: read+execute
Directories, executables, web folders
rwxr-x---
Owner: full, Group: read+execute, Others: none
Private directories shared with group
rwx------
Owner: full access only
Private directories, SSH keys folder
rw-rw-rw-
Read+write for everyone
Shared writable files (rare)
rw-rw-r--
Owner+Group: read+write, Others: read
Shared project files
rw-r--r--
Owner: read+write, Group/Others: read
Web files, HTML, CSS, JS, images
rw-r-----
Owner: read+write, Group: read
Config files with group access
rw-------
Owner: read+write only
SSH keys, passwords, .env files
r-xr-xr-x
Read+execute for everyone
Read-only executables
r--r--r--
Read-only for everyone
Read-only important files
r--------
Owner: read only
SSH private keys (id_rsa)

How Linux File Permissions Work

Permission Breakdown

-rwxr-xr-x

File typeOwnerGroupOthers

Read (r = 4): View file contents or list directory entries

Write (w = 2): Modify/delete a file, or create/delete files in a directory

Execute (x = 1): Run file as a program, or enter a directory (cd)

Octal value: Add the values: rwx = 4+2+1 = 7, r-x = 4+0+1 = 5, r-- = 4+0+0 = 4

Chmod Command Examples

chmod 755 script.sh

Make a script executable by everyone

chmod 644 index.html

Standard web file permissions

chmod 600 ~/.ssh/id_rsa

Secure SSH private key

chmod -R 755 /var/www/html

Recursively set directory permissions

chmod u+x script.sh

Add execute permission for owner only

chmod g+w shared.txt

Add write permission for group

chmod o-rwx private.txt

Remove all permissions from others

chmod a+r public.txt

Add read permission for all (a = all)

Recommended Web Server Permissions

File Type
Permission
Command
Directories
find /path -type d -exec chmod 755 {} \;
HTML/CSS/JS files
find /path -type f -exec chmod 644 {} \;
PHP/CGI scripts
chmod 755 *.php
Config files (.env)
chmod 600 .env
Upload directories
chmod 775 /uploads
Log files
chmod 640 *.log
SSL certificates
chmod 600 /etc/ssl/private/*
WordPress wp-config
chmod 440 wp-config.php

Chmod Symbolic vs Octal Notation

Action
Symbolic
Octal
Set owner rwx, rest rx
chmod u=rwx,go=rx file
chmod 755 file
Set owner rw, rest r
chmod u=rw,go=r file
chmod 644 file
Add execute for owner
chmod u+x file
-
Remove write from others
chmod o-w file
-
Add read for all
chmod a+r file
-
Owner only, full access
chmod u=rwx,go= file
chmod 700 file

Key difference: Symbolic notation supports relative changes (u+x adds execute without changing other permissions). Octal notation always sets all permissions at once. Use symbolic for quick adjustments, octal for setting exact permissions.

Frequently Asked Questions

What is chmod?

chmod (change mode) is a Unix/Linux command that changes file and directory permissions. It controls who can read, write, and execute files. The command works on Linux, macOS, and any Unix-like operating system.

How does the chmod octal (numeric) system work?

Each permission has a numeric value: Read = 4, Write = 2, Execute = 1. Add values for each group (Owner, Group, Others). For example: rwxr-xr-x = 7(4+2+1) 5(4+0+1) 5(4+0+1) = 755.

What is chmod 755?

chmod 755 sets: Owner can read, write, and execute (7). Group can read and execute (5). Others can read and execute (5). This is the standard permission for directories and executable files.

What is chmod 644?

chmod 644 sets: Owner can read and write (6). Group can read only (4). Others can read only (4). This is the standard permission for web files like HTML, CSS, JavaScript, and images.

What is chmod 777?

chmod 777 gives full read, write, and execute access to everyone - owner, group, and all other users. This is a security risk and should never be used in production. Use 755 for directories and 644 for files instead.

What is chmod 600?

chmod 600 sets: Owner can read and write (6). No access for Group or Others. Use this for sensitive files like SSH private keys (~/.ssh/id_rsa), .env files, and password files.

What is the difference between chmod octal and symbolic?

Octal uses numbers (chmod 755 file). Symbolic uses letters (chmod u=rwx,g=rx,o=rx file). Both achieve the same result. Octal is more concise; symbolic is more readable and supports relative changes (chmod g+w file).

What do r, w, x mean in Linux permissions?

r (read) = view file contents or list directory. w (write) = modify/delete file or create files in directory. x (execute) = run file as program or enter directory (cd).

What is the difference between file and directory permissions?

For files: r = read contents, w = modify, x = execute as program. For directories: r = list files (ls), w = create/delete files inside, x = enter directory (cd). A directory needs x to be accessible at all.

What permissions should I use for web server files?

Directories: 755 (drwxr-xr-x). Files: 644 (-rw-r--r--). Config files: 600 or 640. Upload directories: 775 (with proper group). Never use 777 - it's a security vulnerability.

How do I use chmod recursively?

Use chmod -R to apply permissions recursively to all files and subdirectories: chmod -R 755 /path/to/directory. To set different permissions for files vs directories, use find: find /path -type f -exec chmod 644 {} \; and find /path -type d -exec chmod 755 {} \;

What is umask and how does it relate to chmod?

umask sets default permissions for newly created files and directories. It subtracts from full permissions: umask 022 means new files get 644 (666-022) and new directories get 755 (777-022). Check with 'umask' command.

Related Developer Tools

Disclaimer: This tool provides chmod permission calculations for reference. Always verify permissions on your server. Use the principle of least privilege - only grant the minimum access required.