About the Chmod Calculator
This chmod calculator converts Unix and Linux file permissions between the three ways you meet them: octal numbers like 755 or 644, the symbolic string that ls -l prints (rwxr-xr-x), and plain read/write/execute checkboxes for the owner, group and everyone else. It also handles the special setuid, setgid and sticky bits (4755, 2775, 1777) and writes the ready-to-paste chmod command in both numeric and u=,g=,o= form.
It is for developers deploying to a web server, sysadmins fixing “permission denied” errors, and anyone following a tutorial that says “chmod 600 your key”. Paste what you see in ls -l or what a guide tells you, and the calculator explains in plain English who can read, write and execute the file.
Clause input such as u=rwx,g=rx,o= or a+x is applied to a starting mode of 000, so it describes the final permissions rather than a change to an existing file.
How to use the chmod calculator
- 1Choose how you want to enter permissions: octal, symbolic or checkboxes.
- 2Type the value (for example 755 or rw-r--r--) or tick the boxes.
- 3Optionally enter the file name and whether to apply recursively.
- 4Read the octal, symbolic and plain-English results.
- 5Copy the chmod command and run it in your terminal.
Formula and method
Each class of user — owner, group and others — gets one octal digit made by adding read (4), write (2) and execute (1). So rwx = 7, r-x = 5, rw- = 6 and r-- = 4, which is why 755 means rwxr-xr-x and 644 means rw-r--r--.
An optional leading fourth digit holds the special bits: setuid (4), setgid (2) and sticky (1). In the symbolic form they replace the execute letter: s or S in the owner or group position, t or T in the others position (lowercase when execute is also set, uppercase when it is not).
- r = 4
- Read: view file contents or list a directory
- w = 2
- Write: modify a file or create/delete entries in a directory
- x = 1
- Execute: run a file or enter (cd into) a directory
Worked examples
chmod 755 for a script
7 = 4 + 2 + 1 gives the owner read, write and execute; 5 = 4 + 1 gives group and others read and execute. That is the usual setting for scripts and web directories.
Convert rw-r--r-- to octal
rw- is 4 + 2 = 6 for the owner, and r-- is 4 for both group and others, so the file is 644 — the standard for web pages and config files.
Private SSH key
u=rw sets owner read + write (6) and go= removes everything for group and others (0), giving 600 — the permission OpenSSH insists on for private keys.
Shared /tmp directory with sticky bit
The leading 1 is the sticky bit and 777 gives everyone full access; the sticky bit shows as t in place of the last x, so only owners can delete their own files.
Frequently asked questions
What does chmod 755 mean?+
chmod 755 gives the owner read, write and execute (7) and gives the group and everyone else read and execute (5). In ls -l it appears as rwxr-xr-x. It is the usual setting for scripts, programs and directories.
What is the difference between 644 and 755?+
644 (rw-r--r--) lets the owner read and write while others can only read, and nobody can execute. 755 adds execute for everyone. Use 644 for regular files and 755 for scripts and folders.
Is chmod 777 safe?+
Rarely. 777 lets any user on the system modify or replace the file, which is a common way servers get compromised. Fix ownership with chown or use 755/775 instead.
Why does SSH say my private key permissions are too open?+
OpenSSH refuses keys that group or others can read. Run chmod 600 on the private key (or 400 for read-only) so only your user can access it.
What do s and t mean in permissions?+
s in the owner or group execute position is setuid or setgid: the program runs with the owner’s or group’s privileges. t in the others position is the sticky bit, used on shared directories like /tmp.