Loading...
Free online Linux chmod calculator to convert file permissions between octal and symbolic formats. Toggle read, write, execute for owner, group, and others — get chmod commands instantly.
Quick presets:
Chmod Command (Octal)
chmod 755 filenameChmod Command (Symbolic)
chmod u=rwx,g=rx,o=rx filenameThe most commonly used chmod permission combinations for Linux servers, web hosting, and development environments.
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 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)
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.
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.
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.
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.
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.
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.
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.
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).
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).
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.
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.
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 {} \;
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.
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.