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.
Quick presets:
Chmod Command (Octal)
chmod 755 filenameChmod Command (Symbolic)
chmod u=rwx,g=rx,o=rx filenameCommon Chmod Permissions Reference
The most commonly used chmod permission combinations for Linux servers, web hosting, and development environments.
How Linux File Permissions Work
Permission Breakdown
-rwxr-xr-x
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.shMake a script executable by everyone
chmod 644 index.htmlStandard web file permissions
chmod 600 ~/.ssh/id_rsaSecure SSH private key
chmod -R 755 /var/www/htmlRecursively set directory permissions
chmod u+x script.shAdd execute permission for owner only
chmod g+w shared.txtAdd write permission for group
chmod o-rwx private.txtRemove all permissions from others
chmod a+r public.txtAdd read permission for all (a = all)
Recommended Web Server Permissions
Chmod Symbolic vs Octal Notation
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.