Calculating...
Enter an octal or symbolic value, click the grid, or pick a preset — then click Calculate →
How Linux File Permissions Work
Every file and directory in Linux has three permission groups: owner (u), group (g), and others (o). Each group gets three independent bits: read (r = 4), write (w = 2), and execute (x = 1). Adding those bit values gives the octal digit for that group.
for example, chmod 755 means: owner gets 7 (r+w+x = 4+2+1), group gets 5 (r+x = 4+1), others get 5 (r+x = 4+1). The three-digit octal maps directly to the nine-character symbolic string rwxr-xr-x.
A 4-digit octal (e.g. 4755) adds a leading digit for the special permission bits: setuid (4), setgid (2), and sticky (1).
Common chmod Values Reference
| Octal | Symbolic | Name | Typical use |
|---|---|---|---|
| 755 | rwxr-xr-x | Standard dir | Directories, executables (/usr/bin) |
| 644 | rw-r--r-- | Standard file | Source code, config files |
| 600 | rw------- | Private file | SSH private keys, .env files |
| 700 | rwx------ | Private exec | Owner-only scripts |
| 775 | rwxrwxr-x | Group writable dir | Collaborative project directories |
| 664 | rw-rw-r-- | Group editable | Shared project files |
| 777 | rwxrwxrwx | Full access | Temp dirs only — never for sensitive files |
| 400 | r-------- | Owner read only | Certificates, backup files |
| 4755 | rwsr-xr-x | Setuid exec | System binaries (passwd, su) |
| 1777 | rwxrwxrwt | Sticky world dir | /tmp directory |
Special Permission Bits
Setuid
When set on an executable, the file runs with the file owner's privileges rather than the caller's. Used by system programs like passwd and su so non-root users can modify protected resources under careful control.
Setgid
On executables, runs with the file's group privileges. On directories, new files created inside inherit the directory's group instead of the creator's primary group — useful for shared project folders where everyone should own files with the same group.
Sticky bit
On world-writable directories (like /tmp), restricts deletion so that only the file's owner, the directory owner, or root can remove files. Without it, any user could delete another user's files in that directory.
chmod Command Syntax
Octal mode (most common)
chmod 755 /path/to/fileSymbolic mode (add/remove for specific entity)
chmod u+x script.sh Add execute for owner onlyRecursive (directories and contents)
chmod -R 755 /path/to/dir/Check current permissions
ls -la /path/to/fileChange ownership (often paired with chmod)
chown user:group /path/to/fileFrequently Asked Questions
What does chmod 755 mean?
chmod 755 means: the owner has full access (7 = 4+2+1 = read+write+execute), while group and others have read and execute (5 = 4+1 = read+execute) but cannot write. This is the standard permission for directories and executables that should be readable and runnable by everyone but only editable by the owner.
What is the difference between 644 and 755?
The key difference is the execute bit. 644 (rw-r--r--) gives the owner read and write but no execute — correct for regular files like configs and source code. 755 (rwxr-xr-x) adds execute access for all, making it appropriate for directories (which need execute to be searchable) and scripts or binaries that users should be able to run.
When should I use chmod 777?
Almost never. chmod 777 grants full read, write, and execute access to every user on the system. It is acceptable only for temporary scratch directories in isolated environments (like a dev container). On a production server or any multi-user system, 777 is a security risk — any user could overwrite or execute the file. The correct alternative is usually 755 for directories or 755 for executables. if you need group write access, use 775 or 664.
What does the sticky bit do?
The sticky bit (1000) on a directory prevents users from deleting or renaming files they do not own — even if they have write permission on the directory. The canonical example is /tmp, which uses 1777 (rwxrwxrwt): any user can create files there, but only the file's owner or root can delete them.
How do I check file permissions in Linux?
Run ls -la filename to see the symbolic notation, owner, and group. To see the octal value directly, use stat -c "%a %n" filename on Linux or stat -f "%OLp %N" filename on macOS.
Related Developer Tools
Octal Converter
Convert octal to decimal, binary, and hex. Decode Linux chmod permissions like 755 into rwx notation.
Git Command Builder
Build any git command visually with flags and a plain-English explanation.
Cron Job Parser
Parse cron expressions into plain English and see next execution times instantly.