Chmod calculator
Calculate Unix file permissions between octal notation and symbolic rwx format
Quick Input
Permissions
| Read(+4) | Write(+2) | Execute(+1) | Octal | Symbolic | |
|---|---|---|---|---|---|
| Owner | 7 | rwx | |||
| Group | 5 | r-x | |||
| Others | 5 | r-x |
Octal
755
e.g. chmod 755 file
Symbolic
rwxr-xr-x
ls -la output format
Meaning
Owner: read, write, execute
Group: read, execute
Others: read, execute
TL;DR
What is Chmod calculator?
Unix file permissions control which users can read, write, or execute a file. Each file has three sets of permissions: owner, group, and others. The chmod command sets these permissions using either octal notation (e.g. 755) or symbolic notation (e.g. rwxr-xr-x).
How it works
Each permission set is represented as three bits: r (read, value 4), w (write, value 2), x (execute, value 1). Adding the values gives the octal digit for that set. For example, rwx = 4+2+1 = 7, r-x = 4+0+1 = 5, so 755 means owner can read/write/execute; group and others can read and execute only.
Common use cases
- ‣Web server files: 644 (rw-r--r--) for files, 755 (rwxr-xr-x) for directories is the standard web server permission pattern
- ‣Scripts: set 755 to make a script executable by anyone, or 700 to restrict execution to the owner
- ‣SSH keys: ~/.ssh/id_rsa must be 600 (rw-------); SSH refuses to use keys with looser permissions
- ‣Deployment: set correct permissions on deployed files to follow the principle of least privilege
Frequently asked questions
What does the sticky bit do?
The sticky bit (1000 in octal, displayed as t in ls output) on a directory prevents users from deleting files they do not own, even if they have write permission on the directory. It is set on /tmp on most Unix systems.
What is setuid?
The setuid bit (4000) on an executable causes it to run with the permissions of the file owner rather than the user who launches it. The classic example is /usr/bin/passwd, which is owned by root and must write to /etc/shadow. Use with caution as setuid binaries are a common privilege escalation target.