Free tool · Runs in your browser

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.

Presets
ReadWriteExecute
Owneru
Groupg
Otherso
Special bits

In plain English: The owner can read, write, and execute. Group and others can read and execute.

Optional - the file or folder to apply this to
chmod command
$chmod 755 filename
Symbolic form
$chmod u=rwx,g=rx,o=rx filename

What 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 = 7
  • r-x (group) = 4 + 0 + 1 = 5
  • r-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

  1. Tick the read, write, and execute boxes for owner, group, and others.
  2. Or click a preset (644 for files, 755 for scripts, 600 for SSH keys) to set them all at once.
  3. Need a special bit? Toggle setuid, setgid, or sticky.
  4. 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 like rw-r-----.
  5. Add an optional file path and the recursive flag, then copy the ready-to-run command.
  6. For how permissions and system users work together on a server you manage, see Permissions & Access.

Common chmod values

ValueSymbolicUse case
644rw-r--r--Regular files - web pages, configs, documents
755rwxr-xr-xDirectories, scripts, and executables
600rw-------SSH private keys, credentials, secrets
700rwx------The ~/.ssh directory and other private folders
640rw-r-----Readable by a group, but not the rest of the world
664rw-rw-r--Shared files a whole group needs to edit
775rwxrwxr-xGroup-writable project directories
777rwxrwxrwxAvoid - world-writable and a common security risk
Chmod FAQ

Frequently asked questions

Add up the permissions for each of the three groups separately, using read=4, write=2, and execute=1. Do it once for the owner, once for the group, and once for others, then read the three digits left to right. Read, write, and execute is 4+2+1=7; read and execute is 4+1=5; read and write is 4+2=6. So an owner with full access and a group and others that can only read and execute gives 755. The calculator on this page does the arithmetic for you as you tick the boxes.
chmod 755 gives the owner full read, write, and execute permission (7), and gives the group and everyone else read and execute but not write (5 and 5). It is the standard setting for directories, scripts, and executables that everyone should be able to run but only the owner should be able to change.
Both give the owner read and write and grant read access to group and others. The difference is the execute bit: 755 adds execute for everyone (4+1 for group and others), so it is used for directories and runnable scripts, while 644 has no execute bit and is used for regular files like documents, configs, and web pages.
775 (rwxrwxr-x) gives the owner and the group full read, write, and execute permission (7 and 7), and gives everyone else read and execute but not write (5). It is used for shared project directories where every member of a team needs to create, edit, and delete files, while other users on the system can still read and traverse them. The file equivalent, without the execute bit, is 664.
Split the nine characters into three triads, one each for owner, group, and others, then add up the letters in each triad using r=4, w=2, x=1 and treating a dash as zero. For rwxr-xr-x that is rwx=7, r-x=5, and r-x=5, which gives 755. Paste the symbolic string into the Symbolic box on this page and the octal value appears immediately, including 10-character strings copied out of ls -l.
SSH private keys should be chmod 600 (rw-------) so that only the owner can read or write them, and your ~/.ssh directory should be chmod 700. SSH refuses to use a private key that is readable by the group or others. CtrlOps handles this for you - it stores SSH keys encrypted on your own machine with the correct permissions, so they never leave your device.
The -R (recursive) flag applies the permission change to a directory and everything inside it - all subdirectories and files. Use it carefully: applying an executable permission recursively to a tree of regular files, or loosening permissions on a whole directory, can have unintended security consequences.
No. chmod 777 grants read, write, and execute to everyone on the system, including the ability for any user to modify or replace the file. It is almost never the right fix for a permissions problem and is a common security risk. Prefer the narrowest permission that works - usually 644 for files or 755 for directories and scripts.
Octal notation uses numbers (chmod 644 file) where each digit is the sum of read=4, write=2, and execute=1 for owner, group, and others. Symbolic notation uses letters (chmod u=rw,go=r file or chmod +x file) to add, remove, or set specific permissions. Both produce the same result; octal sets everything at once, while symbolic is handy for changing one permission without touching the rest.
Manage servers, not syntax

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