Chmod Calculator

Tick the permissions you want, or type an octal mode such as 755 or a string such as rwxr-xr-x. The tool gives you the chmod command and explains what the mode allows.

Permissions
WhoReadR (4)WriteW (2)ExecuteX (1)Digit
Owner0
Group0
Others0
Special bits
Applies to
Octal
755
ls -l
-rwxr-xr-x

Commands

chmod 755 file
chmod u=rwx,g=rx,o=rx file

What it means

    Common modes

    Umask helper

    New files (666 & ~umask)
    644
    New directories (777 & ~umask)
    755
    umask -S
    u=rwx,g=rx,o=rx

    How to use the chmod calculator

    1. Tick the Read, Write and Execute boxes for the owner, group and others, or type a mode into Octal mode (644, 4755) or Symbolic (rw-r--r--). All three stay in sync.
    2. Tick Setuid, Setgid or Sticky if you need a special bit. The octal mode grows to four digits and the symbolic form shows s, S, t or T.
    3. Choose File or Directory under Applies to. This sets the first character of the ls -l string and changes the plain-English explanation, since read, write and execute mean different things on a directory.
    4. Type the target into File or directory name, then copy the octal or symbolic chmod command.
    5. Click a mode under Common modes to load it, or enter your umask in the Umask helper to see the permissions new files and directories get.

    What this chmod calculator does

    Every file and directory on Linux, macOS and other Unix-like systems has a set of permission bits that say who can read, write and execute it. chmod changes them. The bits can be written two ways: as an octal number such as 755, or as letters such as rwxr-xr-x. This calculator converts between the two, builds both forms of the chmod command, and explains in plain English what the mode allows. Everything runs in your browser.

    How octal permissions work

    There are three classes of user: the file's owner (u), its group (g) and others (o), meaning everyone else. Each class gets one octal digit, made by adding read (4), write (2) and execute (1). Because each digit holds exactly three bits, octal maps neatly onto rwx.

    DigitLettersMeaning
    7rwxread, write and execute
    6rw-read and write
    5r-xread and execute
    4r--read only
    3-wxwrite and execute
    2-w-write only
    1--xexecute only
    0---no access

    So chmod 755 is rwxr-xr-x: the owner has 4+2+1, and the group and others have 4+1. chmod 644 is rw-r--r--: the owner can read and write, and everyone else can only read. chmod 777 is rwxrwxrwx, full access for every user on the system.

    On a directory, the same bits mean something different. Read lets you list the names inside, write lets you add, delete and rename entries, and execute (also called search) lets you enter the directory and reach the files in it. A directory usually needs execute wherever it has read, which is why directories are often 755 while the files inside are 644.

    Special bits: setuid, setgid and sticky

    A fourth, leading octal digit holds three special bits. In ls -l output they replace the execute character, in lowercase when execute is also set and in uppercase when it is not.

    BitOctalShown asEffect
    Setuid4000s or S in the owner's execute placeAn executable runs with the file owner's user ID. Linux ignores it on scripts.
    Setgid2000s or S in the group's execute placeAn executable runs with the file's group ID. On a directory, new files take the directory's group and new subdirectories inherit the setgid bit.
    Sticky1000t or T in the others' execute placeOn a directory, only a file's owner, the directory's owner or root can delete or rename that file.

    For example, /tmp is normally 1777, shown as drwxrwxrwt: anyone can create files, but nobody can delete someone else's. A shared team directory set to 2775 shows as drwxrwsr-x, and files created in it belong to the directory's group rather than the creator's primary group. An uppercase S, as in rwSr--r-- (4644), means the setuid bit is set on a file nobody can execute, so it has no effect.

    Umask and default permissions

    New files don't start with 777. A program asks for a mode when it creates a file, usually 666 for files and 777 for directories, and the system clears every bit that is set in the process's umask. The result is mode & ~umask, a bitwise operation rather than a subtraction.

    UmaskNew filesNew directories
    022644 rw-r--r--755 rwxr-xr-x
    002664 rw-rw-r--775 rwxrwxr-x
    027640 rw-r-----750 rwxr-x---
    077600 rw-------700 rwx------

    The difference from subtraction shows with umask 033: new files get 644, not 666 − 033 = 633, because the execute bits it clears were never requested for files. Directories get 744.

    The umask also affects chmod itself when a symbolic mode leaves out the u, g, o or a part. With umask 022, chmod +w file adds write for the owner only, and chmod -w file leaves the group and others' write bits alone. Write chmod a+w or chmod a-w to change every class regardless of the umask. Octal modes and the symbolic commands this tool generates name every class, so the umask does not change them.

    Common mistakes

    Key terms

    File mode
    The permission bits stored with every file and directory on a Unix-like system: read, write and execute for the owner, group and others, plus the setuid, setgid and sticky bits. ls -l shows it as a string such as -rwxr-xr-x.
    Octal mode
    A file mode written as three or four octal digits, such as 644 or 4755. Each of the last three digits adds read (4), write (2) and execute (1) for the owner, group and others; an optional leading digit holds setuid (4), setgid (2) and sticky (1).
    Symbolic mode
    A chmod mode written with letters: u, g, o or a for who, +, - or = for the change, and r, w, x, X, s or t for the permissions. u=rwx,g=rx,o=rx sets the same bits as 755, while g+w only adds group write.
    Setuid
    The set-user-ID bit (octal 4000). When an executable file with this bit runs, the process gets the file owner's user ID as its effective user ID, not that of the user who started it. Linux ignores the bit on scripts.
    Setgid
    The set-group-ID bit (octal 2000). On an executable it makes the process run with the file's group ID. On a directory it makes new files inside take the directory's group, and new subdirectories inherit the bit.
    Sticky bit
    The restricted deletion flag (octal 1000), shown as t or T. On a directory such as /tmp it stops users from deleting or renaming files they do not own, even though the directory is writable by everyone.
    Umask
    The file mode creation mask of a process: permission bits to clear from every new file and directory it creates. With the common umask 022, a file requested as 666 is created as 644 and a directory requested as 777 as 755.
    Execute permission
    For a file, permission to run it as a program. For a directory, also called search permission, it allows entering the directory and accessing the files inside by name, even without permission to list them.

    Frequently asked questions

    What does chmod 755 mean?
    755 is rwxr-xr-x: the owner can read, write and execute, and the group and everyone else can read and execute but not change the file. It is the usual mode for directories, programs and scripts.
    What does chmod 644 mean?
    644 is rw-r--r--: the owner can read and write, and the group and others can only read. It is the usual mode for ordinary files such as documents, web pages and config files.
    Is chmod 777 safe?
    Rarely. 777 lets every user on the system read, change, replace or run the file, and on a directory lets anyone delete files in it. Shared directories such as /tmp use 1777, which adds the sticky bit so users can only delete their own files.
    What is the difference between chmod 755 and 0755?
    None: the leading 0 just says no special bits are set. A leading 4, as in 4755, adds setuid. With GNU chmod a 3- or 4-digit mode also leaves a directory's setuid and setgid bits as they are; use 00755, =755 or chmod ug-s to clear them.
    What do the s and t letters in ls -l mean?
    s in the owner or group execute position means setuid or setgid is set along with execute; S means the special bit is set without execute. t in the others position means the sticky bit is set with execute for others, and T means without it.
    How do I make a script executable?
    Run chmod +x script.sh, or chmod u+x script.sh to give execute to the owner only. Without a u, g, o or a, +x adds execute only to the classes your umask allows. To run it on a schedule, build the line with the cron expression generator.
    Why does my new file have 644 and not 666?
    Your umask, usually 022, clears group and others' write from the 666 that programs request for new files. Run umask to see yours, and use the umask helper above to see the result for any mask.
    What permissions should SSH keys have?
    The ssh manual says it ignores a private key file that other users can access, so private keys are usually 600 or 400. It recommends that ~/.ssh is read, write and execute for you and not accessible by others, which is 700.

    Sources: POSIX chmod, POSIX umask, POSIX ls (long format), GNU coreutils: File permissions, GNU coreutils: Directory setuid and setgid, Linux umask(2), Linux inode(7), Linux execve(2), OpenSSH ssh(1). Last checked 2026-11-18.