Search tools

Chmod Calculator

Convert Linux file permissions between numbers and letters, and see who can do what.

Runs entirely in your browser. Nothing you paste is sent to our server, stored or logged.

Permissions for each class of user
Who ReadWriteExecute
Owner
Group
Everyone else
Special modes
Paste straight from ls -l, file type letter and all.

Common permissions

Who can do what

    Command

    With a number

    With letters

    Tick the permissions you want, type a number such as 755, or paste the permission string from ls. Everything stays in sync, and you get the exact chmod command to run along with a plain explanation of who can read, change or run the file.

    How chmod numbers work

    Linux permissions come in three sets: the owner, the group and everyone else. Each set can read, write and execute. Read is worth 4, write is worth 2 and execute is worth 1, and each digit in a chmod number is the total for one set. So 7 means everything, 6 means read and write, 5 means read and execute and 4 means read only.

    Reading permission strings

    The same permissions appear as letters when you run ls -l. The first character is the file type, d for a directory and - for a regular file, followed by three groups of rwx. A missing permission shows as a dash in its position, so rwxr-xr-x is 755 and rw-r--r-- is 644.

    Setuid, setgid and the sticky bit

    An optional fourth digit at the front sets special modes. 4 is setuid, which runs a program with its owner's rights. 2 is setgid, which runs it with the group's rights, or makes new files in a directory inherit that group. 1 is the sticky bit, which stops users deleting each other's files in a shared folder such as /tmp. They appear as s and t in place of the execute letters.

    How to use the chmod calculator

    1. Choose permissionsTick read, write and execute for the owner, the group and everyone else.
    2. Or type a valueEnter a number such as 644, or paste the permission string straight from ls.
    3. Copy the commandCopy the numeric or the symbolic chmod command and run it in your terminal.

    Common questions

    What does chmod 755 mean?

    The owner can read, write and execute, and everyone else can read and execute. It is the usual setting for directories and for scripts other users need to run.

    What is the difference between 755 and 644?

    755 adds execute permission for everyone. Use 755 for directories and programs, and 644 for ordinary files such as web pages and images, which only need to be read.

    Is chmod 777 safe?

    Rarely. It lets every user and process on the machine change the file. Fix a permission error by giving the right user ownership with chown instead, and keep directories at 755 or 775.

    What does execute mean on a directory?

    On a directory, execute means permission to enter it and open the files inside by name. Without it, even a directory you can read cannot be opened.

    How do I change permissions for a whole folder?

    Use chmod with its recursive option, a capital R, on the folder. Be careful: that gives every file the same permission as the directories. Most people set directories to 755 and files to 644 separately, using find to select each kind.

    Does this calculator send my data anywhere?

    No. Every calculation happens in your browser, and nothing you type is sent to our server.

    Guides