| Read (4) | Write (2) | Execute (1) | Σ | |
|---|---|---|---|---|
| OwnerThe user who owns the file | 7 | |||
| GroupMembers of the file’s group | 5 | |||
| OthersEveryone else | 5 |
Special bits
3 or 4 digits, e.g. 755 or 4755
9 characters, e.g. rwxr-xr-x
$ chmod 755 script.sh$ chmod u=rwx,g=rx,o=rx script.shAs shown by ls -l: -rwxr-xr-x · drwxr-xr-x
Work out Unix file permissions by ticking boxes or typing octal (755) or symbolic (rwxr-xr-x) notation; every view stays in sync. The tool writes the chmod command, explains what each bit allows, warns about risky modes, and includes a umask calculator.
Tick Read, Write, and Execute for Owner, Group, and Others, or pick from Common modes.
Or type a value into Numeric (octal) or Symbolic; the checkboxes update.
Add Special bits such as setuid, setgid, or Sticky if needed.
Enter a File or folder name, choose Apply to subfolders (-R) if wanted, and copy the command.
The owner can read, write, and execute; group and others can read and execute. It is the usual mode for scripts, programs, and folders.
600: only the owner can read and write it. SSH refuses keys that other users can read.
With 777 anyone on the system can modify the file. On servers this is a common security hole.
setuid or setgid is set without execute (S), or sticky is set without execute for others (T). An S has no effect on a regular file.
umask removes bits from the default permissions. Enter a value such as 022 in the umask calculator to see the resulting modes for new files and folders.