readwriteexecute
owner
group
others
Symbolicrw-r--r--
Commandchmod 644 filename

chmod sets who can read (4), write (2) and execute (1) a file on Linux and macOS. Each digit of the octal mode adds those values for one class: the owner, the group and others. So 755 is rwx for the owner and r-x for everyone else.


Tick the boxes or type an octal mode: both stay in sync, and the symbolic form matches what ls -l prints. The special bits add a leading digit: setuid (4), setgid (2) and the sticky bit (1).

Frequently asked questions

What do the numbers in chmod 755 mean?

Each digit is one class: owner, group, others. A digit adds read (4), write (2) and execute (1). So 7 is rwx and 5 is r-x, and 755 means the owner can do everything while the group and others can read and execute.

Which permissions should I use for files and directories?

644 is common for files (owner writes, everyone reads), 755 for directories and scripts, and 600 or 700 for private files such as SSH keys. Avoid 777, which lets anyone modify the file.

What are setuid, setgid and the sticky bit?

They add a leading fourth digit. Setuid (4) and setgid (2) run an executable as its owner or group, and the sticky bit (1) on a directory lets only a file's owner delete it, as in /tmp.

Related tools

Guides & comparisons