Chmod Calculator
Convert Linux file permissions between octal and symbolic notation, then copy the exact chmod command. Everything runs locally in your browser - nothing is uploaded.
In plain English: The owner can read, write, and execute. Group and others can read and execute.
chmod 755 filenamechmod u=rwx,g=rx,o=rx filenameWhat is chmod?
chmod ("change mode") is the Linux and macOS command that sets the permissions of a file or directory - who can read, write, and execute it. You reach for it constantly: making a script runnable, locking down an SSH private key, or fixing a "Permission denied" error on a web server.
This calculator turns the permission checkboxes into the precise numeric and symbolic command, so you never have to guess whether you want 644 or 755.
How Linux permissions work
Every file has three permission groups - Owner (the user who owns it), Group (members of the file's group), and Others (everyone else). Each group can be granted any combination of three permissions, and each permission has a numeric value:
- Read (r) =
4 - Write (w) =
2 - Execute (x) =
1
Add the values for each group to get its digit. Read + write + execute is 4 + 2 + 1 = 7; read + execute is 4 + 1 = 5. Do that for owner, group, and others and you get the familiar three-digit number, like 755.
Octal vs symbolic notation
The same permissions can be written two ways. Octal uses the digits above - 755. Symbolic spells out each group as nine characters - rwxr-xr-x - which is exactly what you see in the output of ls -l. A dash means the permission is not granted.
chmod accepts both. chmod 755 file and chmod u=rwx,g=rx,o=rx file do the same thing. The calculator above shows both forms live as you toggle permissions.
Convert symbolic to octal: rwxr-xr-x to 755
The calculator converts in both directions. Type an octal value like 755 to see the symbolic form, or type rwxr-xr-x into the Symbolic field to get 755 back. You can paste a line straight out of ls -l as well: the leading file-type character in -rw-r--r-- or drwxr-xr-x is ignored.
To convert by hand, split the nine characters into three triads and add up each one, where r is 4, w is 2, and x is 1. A dash counts as zero. For rwxr-xr-x:
rwx(owner) = 4 + 2 + 1 = 7r-x(group) = 4 + 0 + 1 = 5r-x(others) = 4 + 0 + 1 = 5
Read the three digits together and rwxr-xr-x is 755. The method runs the same way in reverse: split 644 into 6, 4, and 4, then expand each digit back into its read, write, and execute bits to get rw-r--r--.
Common chmod values explained
Eight values cover nearly everything you will set day to day. Each is listed with its symbolic form so you can match it against what ls -l prints.
chmod 777 (rwxrwxrwx)
Everyone on the system can read, write, and execute the file. Treat 777 as a red flag rather than a fix, because any user or process can then modify or replace it. If a permission error pushed you here, 755 or 644 is almost always the correct answer.
chmod 755 (rwxr-xr-x)
The owner can do anything; everyone else can read and execute but not modify. This is the standard for directories, shell scripts, and binaries, and for web roots where the server needs to traverse and read files but never write to them.
chmod 700 (rwx------)
The owner has full access and nobody else has any at all. Use it for private directories, most importantly ~/.ssh, which OpenSSH expects to be closed to group and others.
chmod 644 (rw-r--r--)
The owner can read and write; everyone else can only read. This is the default for regular files: HTML, images, configs, and documents that a web server or other users need to read but should never change.
chmod 640 (rw-r-----)
Like 644, except the rest of the world is locked out entirely and only the file's group can read it. A good fit for config files that hold credentials and are read by a service account belonging to that group.
chmod 600 (rw-------)
Only the owner can read or write. This is the required mode for SSH private keys, and the right one for .env files and API credentials. SSH refuses to use a key that is readable by anyone else.
chmod 775 (rwxrwxr-x)
The owner and the group both get full access, while others can read and execute. Use it for shared project directories where every member of a team needs to create and delete files.
chmod 664 (rw-rw-r--)
The owner and the group can both read and write; others can only read. This is the file counterpart to 775, for documents a team edits collectively.
Special permissions: setuid, setgid, and sticky
A fourth, leading digit controls three special bits. setuid (4) runs an executable as its owner, setgid (2) runs it as its group (or makes new files in a directory inherit the group), and the sticky bit (1) stops users from deleting each other's files in a shared directory like /tmp.
Toggle them in the calculator and the octal value gains a leading digit - for example 1755 for a sticky directory, or 4755 for a setuid binary.
chmod vs chown: permissions vs ownership
chmod changes what can be done to a file. chown changes who owns it. They solve two halves of the same problem, which is why a stubborn "Permission denied" often needs both.
There is nothing to calculate for chown: it takes a user, and optionally a group after a colon, by name rather than by number. So chown alice:developers app.log hands the file to the user alice and the group developers. It accepts the same -R flag as chmod, and normally needs sudo, since handing your files to another user is a privileged act.
When you are fixing a deployment, ownership comes first and permissions second: sudo chown -R www-data:www-data /var/www/site, then sudo chmod -R 755 /var/www/site. Setting permissions first and ownership second usually means doing the permissions twice.
How to use this calculator
- Tick the read, write, and execute boxes for owner, group, and others.
- Or click a preset (644 for files, 755 for scripts, 600 for SSH keys) to set them all at once.
- Need a special bit? Toggle setuid, setgid, or sticky.
- Watch the octal and symbolic values update live, or work backwards by typing into either box: an octal value like
640, or a symbolic string likerw-r-----. - Add an optional file path and the recursive flag, then copy the ready-to-run command.
- For how permissions and system users work together on a server you manage, see Permissions & Access.
Common chmod values
| Value | Symbolic | Use case |
|---|---|---|
| 644 | rw-r--r-- | Regular files - web pages, configs, documents |
| 755 | rwxr-xr-x | Directories, scripts, and executables |
| 600 | rw------- | SSH private keys, credentials, secrets |
| 700 | rwx------ | The ~/.ssh directory and other private folders |
| 640 | rw-r----- | Readable by a group, but not the rest of the world |
| 664 | rw-rw-r-- | Shared files a whole group needs to edit |
| 775 | rwxrwxr-x | Group-writable project directories |
| 777 | rwxrwxrwx | Avoid - world-writable and a common security risk |
Frequently asked questions
Related developer tools
Stop looking up chmod every time.
CtrlOps' AI terminal turns plain English into the exact command, and its GUI file manager sets permissions with a click - all over SSH, with your credentials encrypted on your own machine.
✓ Start instantly·✓ No credit card·✓ No sneaky autorenewals