๐Ÿ” chmod Permission Calculator

ReadWriteExecute
Owner
Group
Other
Octal notation755
Symbolic notationrwxr-xr-x
chmod commandchmod 755 file

Edit Unix/Linux file permissions using read/write/execute checkboxes for owner, group, and other, or by entering an octal value (e.g. 755) directly. Supports setuid, setgid, and the sticky bit, and generates a ready-to-copy chmod command.

How to use

  1. Toggle the read/write/execute checkboxes for owner, group, and other, or type an octal value directly.
  2. Optionally set setuid, setgid, or the sticky bit.
  3. The octal notation, symbolic notation (e.g. rwxr-xr-x), and chmod command update automatically.

How the calculation works

chmod is the Linux and macOS command that changes file and folder permissions. Tick the permissions you want and this tool converts between the octal number used with chmod and the symbolic form shown by ls -l. Permissions are given for three classes โ€” owner, group and others โ€” each as the sum of read (r = 4), write (w = 2) and execute (x = 1). So rwx is 4 + 2 + 1 = 7 and r-x is 4 + 1 = 5. A leading fourth digit sets special permissions: โ€ข setuid (4): runs with the owner's privileges (the owner's x shows as s) โ€ข setgid (2): runs with the group's privileges; on a folder, new files inherit the folder's group โ€ข sticky bit (1): on a folder, only a file's owner can delete it (the last character shows as t)

Worked example

755 โ†’ rwxr-xr-x (owner can do everything; others can read and execute): typical for programs and folders 644 โ†’ rw-r--r-- (owner can read and write; others read only): typical for ordinary files 600 โ†’ rw-------: files only you should read, such as SSH private keys 4755 โ†’ rwsr-xr-x: commands such as passwd 1777 โ†’ rwxrwxrwt: the /tmp folder Command example: chmod 644 index.html

Things to be aware of

  • Avoid 777 (everyone can do everything) on web servers; it lets others modify your files.
  • Execute permission on a folder is what allows entering it (cd).
  • SSH refuses to use a private key file whose permissions are too open (such as 644).

FAQ

What does each digit of the octal value mean?

In a 4-digit value, the first digit is the sum of special permissions (setuid=4, setgid=2, sticky=1), and the remaining three digits are the sum of read=4, write=2, execute=1 for owner, group, and other respectively.

What do the uppercase S and T mean in symbolic notation?

They indicate that setuid, setgid, or the sticky bit is set without the corresponding execute permission (e.g. setuid set with no execute permission shows as rwS).

What do common values like 755 or 644 mean?

755 grants the owner read/write/execute and grants group/other read and execute only โ€” typical for executables and directories. 644 grants the owner read/write and grants group/other read only โ€” typical for regular files.