Maaz Zindani

Loading the index…

↑↓ move↵ openesc close3993 pages

Free tool · Developer tools

Chmod calculator

Tick the permissions or type a number, and see the octal mode, the symbolic form (rwxr-xr-x), who can do what and the ready-to-paste chmod command. Setuid, setgid and sticky bits are included.

  • Free
  • No sign-up
  • Runs in your browser

By Maaz Zindani · Updated

Owner (user)
Group
Others
Special bits
It is a
Common modes
Permissions

755rwxr-xr-x for a file

chmod 755 file
  • Owner rwx
  • Group r-x
  • Others r-x
Owner (7)
read, change contents, run it
Group (5)
read, run it
Others (5)
read, run it
Symbolic command
chmod u=rwx,g=rx,o=rx file
Recursive
chmod -R 755 file
umask for new files
none: new files start without execute
  • Execute lets this file be run as a program or script.

How to use the Chmod Calculator

  1. Tick Read, Write and Execute for Owner, Group and Others, or add Setuid, Setgid and Sticky.
  2. Or type into Octal mode (for example 644) or Symbolic mode (for example rwxr-xr-x). The boxes and ticks stay in step.
  3. Enter the File or folder name and say whether it is a File or Directory, because execute means something different for each.
  4. Press Copy command or Copy symbolic form, or tap one of the Common modes to start from it.

What does chmod 755 mean?

A Unix permission mode has three classes, owner, group and others, and each class gets a number from 0 to 7 that adds up three permissions: read = 4, write = 2 and execute = 1. For 755, the owner has 7 = 4 + 2 + 1 (read, write and execute), the group has 5 = 4 + 1 (read and execute), and others have 5 as well. The symbolic form is rwxr-xr-x, and the command is chmod 755 file. In words: the owner can do everything, everyone else can read and run it but not change it.

The same mode in symbolic style is chmod u=rwx,g=rx,o=rx file. For a directory, the permissions read a little differently: read lets you list the names inside, write lets you add or remove entries, and execute lets you enter (search) the directory, according to the chmod manual. That is why a folder is usually 755 and not 644: without execute nobody can open it. Pick Directory in the tool and the result text changes to match.

How do I convert rwx to a number, and the other way?

Go class by class. Write a 1 for each letter that is present and a 0 for each dash, then read the three as binary: r-x is 101, which is 5; rw- is 110, which is 6. So rw-r--r-- is 6, 4, 4, or 644. To go back, split the number into digits and subtract: a 6 is 4 + 2 (read and write), a 4 is read only. The calculator does both directions and rejects bad input with a message, such as a digit 8 in an octal number or a letter that is not allowed in that position.

A fourth leading digit holds the special bits: 4 for setuid, 2 for setgid and 1 for sticky, added together. Omitted leading digits count as zero, so 755 and 0755 are the same mode. In the symbolic form, setuid shows as s in the owner's execute slot (a capital S if execute is off), setgid shows in the group slot, and the sticky bit shows as t (or T) in the last slot. Mode 4755 is rwsr-xr-x and 1777 is rwxrwxrwt. The first character of an ls -l line is the file type, not a permission; paste all ten characters and the tool drops it for you.

What is the difference between chmod 644 and 755, and is 777 safe?

The only difference between 644 and 755 is execute. 644 lets the owner read and write and everyone else read, which suits a text file, an image or a web page. 755 adds execute for all three, which suits a program, a script or a directory. A script that fails with "permission denied" is often 644 and needs 755 or 700.

777 gives everyone, every user on the machine, permission to read, write and execute. It is rarely the right fix, because any user or program can then change or replace the file. When something will not work, work out which user needs which access and grant only that, for example 775 for a folder shared by a group. The sticky bit is the safer tool for shared writable folders: on a directory it stops users removing or renaming files they do not own, which is how /tmp works, mode 1777.

Mode and umask are related. When a program creates a file, the mode it asks for has the umask bits removed: the system takes the requested mode and clears every bit set in the umask. With the common umask 022, a new file created with 666 ends up 644. In this tool, the line umask for new files shows the umask that would produce your mode from 666: for 644 it is 022, and for a 755 directory the umask for new directories, from 777, is 022.

Common modes, computed by this calculator
OctalSymbolicOwner / group / others canTypical use
400r--------read / nothing / nothingRead-only for the owner: a private key or secret file
440r--r-----read / read / nothingOwner and group read only
444r--r--r--read / read / readEveryone can read, nobody can write
600rw-------read and write / nothing / nothingPrivate file the owner can edit
640rw-r-----read and write / read / nothingOwner edits, group reads
644rw-r--r--read and write / read / readUsual web or text file: owner edits, everyone reads
660rw-rw----read and write / read and write / nothingOwner and group both edit
664rw-rw-r--read and write / read and write / readGroup-shared file everyone can read
666rw-rw-rw-read and write / read and write / read and writeEveryone can read and write: avoid
700rwx------read, write and execute / nothing / nothingPrivate directory or script, owner only
750rwxr-x---read, write and execute / read and execute / nothingOwner full, group can read and run
755rwxr-xr-xread, write and execute / read and execute / read and executeUsual program or directory: owner full, others read and run
770rwxrwx---read, write and execute / read, write and execute / nothingOwner and group full, others none
775rwxrwxr-xread, write and execute / read, write and execute / read and executeShared directory the group can write
777rwxrwxrwxread, write and execute / read, write and execute / read, write and executeAnyone can do anything: avoid
1755rwxr-xr-tread, write and execute / read and execute / read and execute755 plus the sticky bit
2755rwxr-sr-xread, write and execute / read and execute / read and execute755 plus setgid
4755rwsr-xr-xread, write and execute / read and execute / read and execute755 plus setuid
1777rwxrwxrwtread, write and execute / read, write and execute / read, write and executeShared writable directory with sticky bit, like /tmp

To change a whole tree, chmod -R applies one mode to every file and folder inside, which usually is not what you want, because files and folders need different modes. The tool shows the recursive command next to the single-item one. These commands are for Linux, macOS and other Unix-like systems; Windows file permissions work differently. For the rest of your command-line work, the number base converter turns octal into binary, decimal or hex, and the cron expression generator is useful when you schedule a script you have just made executable.

Use it with

Questions

What does chmod 755 mean?

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

What is the difference between chmod 644 and 755?

Execute. 644 (rw-r--r--) lets the owner read and write and everyone else read. 755 (rwxr-xr-x) adds execute for everyone, so the item can be run or, for a directory, entered.

How do I convert rwx to a number?

Give each class the sum of read 4, write 2 and execute 1. rw- is 6, r-- is 4, so rw-r--r-- is 644. Type rwxr-xr-x into Symbolic mode and the calculator shows 755.

Is chmod 777 safe?

Rarely. It lets every user read, write and execute the item, so anyone can change or replace it. Grant the least access that works, such as 775 for a group folder, or use the sticky bit (1777) for a shared writable directory.

How do I chmod all files in a folder recursively?

Use chmod -R with a mode, for example chmod -R 755 folder. It applies the same mode to files and folders alike, so check whether files and folders need different modes first.

Does the calculator send anything to a server?

No. It is plain arithmetic in your browser, and nothing you type leaves your device.

How this page was made: the tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations were drafted with AI help and checked against the tool's own output.