Chmod Calculator

Use this chmod calculator to convert Linux file permissions between checkboxes, octal numbers like 755 or 4755 and symbolic notation like rwxr-xr-x, and copy the chmod command.

Permissions
ReadWriteExecute
Owner
Group
Others
Special bits
Common permissions
chmod command
Symbolic command
ls -l shows
Four-digit mode
Who can do what
    OwnerGroupOthers readwriteexecute list filescreate, rename and delete filesenter and access files no access

    Calculate chmod Permissions

    Every file and directory on Linux, macOS and other Unix-like systems has permissions for three groups of users: the owner, the group and everyone else. This chmod calculator shows them three ways at once, as checkboxes, as an octal number such as 755 and as the symbolic string rwxr-xr-x you see in ls -l.

    Change any of them and the others update instantly, including the setuid, setgid and sticky bits. Copy a ready chmod command in numeric or symbolic form, read in plain words who can do what, and get a warning when a mode is risky.

    Octal permission converted to symbolic notationchmod 755rwxr-xr-xChmodCalculator

    How to use the chmod calculator

    1. Tick the permissions for owner, group and others, or type an octal mode (644) or a symbolic one (rw-r--r--). You can also paste the first column of ls -l, such as drwxr-xr-x.
    2. Add special bits if needed: setuid, setgid or the sticky bit.
    3. Enter the file or directory name and choose Recursive to apply the mode to a whole folder.
    4. Copy the command and run it in your terminal, for example chmod 755 deploy.sh.

    How octal permissions work

    Each permission has a value: read = 4, write = 2 and execute = 1. Add them up for each class of user and write the three sums side by side: owner, group, others.

    For 755: the owner has 4 + 2 + 1 = 7 (read, write, execute), the group has 4 + 1 = 5 (read, execute) and others have 5 as well. In symbolic form that is rwx r-x r-x, or rwxr-xr-x.

    An optional fourth digit in front holds the special bits: setuid = 4, setgid = 2 and sticky = 1. So 4755 is 755 plus setuid, shown as rwsr-xr-x, and 1777 is 777 plus the sticky bit, shown as rwxrwxrwt. A lower-case s or t means execute is also set; a capital S or T means it is not.

    On a directory, read lets you list its contents, write lets you create, rename and delete files in it (together with execute), and execute lets you enter it and reach the files inside.

    Common chmod permissions

    OctalSymbolicMeaningTypical use
    400r--------Owner can read onlyRead-only secrets, for example an AWS .pem key
    600rw-------Owner can read and writeSSH private keys, ~/.ssh/authorized_keys, .env files
    640rw-r-----Owner read/write, group readConfig files read by a service group, log files
    644rw-r--r--Owner read/write, everyone readNormal files: HTML, CSS, images, most configs
    664rw-rw-r--Owner and group read/write, others readFiles shared by a team in a group
    700rwx------Owner has full accessPrivate directories such as ~/.ssh, private scripts
    750rwxr-x---Owner full, group read/executeApp directories shared with a service group
    755rwxr-xr-xOwner full, everyone read/executeDirectories, scripts and programs
    775rwxrwxr-xOwner and group full, others read/executeShared project directories
    777rwxrwxrwxEveryone has full accessAvoid: anyone on the system can change or delete
    440r--r-----Owner and group read only/etc/sudoers uses 0440
    4755rwsr-xr-xSetuid + 755Programs that run as their owner, such as passwd
    2775rwxrwsr-xSetgid + 775Shared directories where new files keep the group
    1777rwxrwxrwtSticky bit + 777/tmp: everyone can write, only owners can delete

    Symbolic chmod commands

    Besides numbers, chmod accepts symbolic changes: who (u owner, g group, o others, a all), an operator (+ add, - remove, = set exactly) and the permissions.

    • chmod +x script.sh makes a script executable for everyone (minus your umask).
    • chmod u=rwx,g=rx,o= dir sets the exact mode 750.
    • chmod -R u=rwX,go=rX site/ uses a capital X: execute is added only to directories and files that are already executable, which is the safe way to fix a whole web folder.

    Security tips

    • Never use 777 to fix an error. If a web server cannot write to a folder, change the owner or group (chown) and use 775 or 770 instead.
    • Files 644, directories 755 is a sensible default for websites. Secrets such as .env files and private keys should be 600 or 400; SSH refuses private keys that others can read.
    • Be careful with -R. chmod -R 755 also makes every file executable. Use find with -type f and -type d, or the capital X, to treat files and directories differently.
    • Directories keep setuid/setgid. GNU chmod does not clear these bits on a directory when you give a three-digit mode; use chmod g-s dir or a five-digit mode such as 00755.
    • Default permissions come from umask. With the common umask 022, new files get 644 and new directories 755; with 002 they get 664 and 775.

    Working on server networking too? Plan address ranges with the subnet calculator and firewall rules with the CIDR calculator.

    Frequently Asked Questions

    Common questions about chmod and file permissions.

    The owner can read, write and execute (7), while the group and others can read and execute (5). It is the usual mode for directories and scripts: rwxr-xr-x.

    The owner can read and write (6) and everyone else can only read (4): rw-r--r--. It is the standard mode for regular files such as web pages and images.

    It gives every user on the system permission to change, replace or delete the file. On a web server, a compromised process could modify your code. Fix ownership and use 755 or 775 instead.

    Setuid (the 4 in 4755) makes a program run with the permissions of its owner instead of the user who started it. passwd uses it to update password files. It is shown as an s in the owner execute position.

    On a directory, the sticky bit (the 1 in 1777) lets users delete or rename only their own files, even though everyone can write to the directory. /tmp uses it, shown as a t at the end: rwxrwxrwt.

    Run chmod +x file to add execute for everyone, or chmod u+x file for the owner only. In octal, 755 or 700 are common choices for scripts.

    The ~/.ssh directory should be 700, private keys 600 (or 400) and authorized_keys 600. OpenSSH refuses to use a private key that other users can read.