chmod Calculator - File Permission Calculator
Developer Tools
Convert 3- and 4-digit chmod modes to symbolic permissions. Toggle rwx, setuid, setgid, and sticky bits to see the matching command.
| Entity | Read (4) | Write (2) | Execute (1) | Octal |
|---|---|---|---|---|
| Owner | 7 | |||
| Group | 5 | |||
| Other | 5 |
Common presets
How to use this tool
- Toggle read, write, and execute permissions for the owner, group, and others.
- Use the setuid, setgid, and sticky controls to add special permission bits.
- The octal mode, symbolic notation, and chmod command update instantly.
- Or enter a three- or four-digit octal mode to update the controls.
Understanding Unix file permissions
Unix/Linux file permissions are controlled with a 9-bit octal system. Each file and directory has three permission groups: Owner, Group, and Others. Each group has three bits: read (r), write (w), and execute (x).
Octal notation
| Octal | Binary | Permissions |
|---|---|---|
| 0 | 000 | --- (none) |
| 1 | 001 | --x (execute) |
| 2 | 010 | -w- (write) |
| 3 | 011 | -wx (write + execute) |
| 4 | 100 | r-- (read) |
| 5 | 101 | r-x (read + execute) |
| 6 | 110 | rw- (read + write) |
| 7 | 111 | rwx (all) |
Common permission patterns
644- owner: rw-, group: r--, others: r-- (typical file)755- owner: rwx, group: r-x, others: r-x (typical script/directory)600- owner: rw-, group: ---, others: --- (private key, SSH config)777- all users: rwx (avoid - insecure)
Special permission bits
| Bit | Octal | Effect on files | Effect on directories |
|---|---|---|---|
| Setuid (SUID) | 4xxx (e.g., 4755) | Process runs as file owner, not caller (e.g., /usr/bin/passwd) | No standard effect (ignored on most Linux systems) |
| Setgid (SGID) | 2xxx (e.g., 2755) | Process runs with file's group | New files inherit directory's group; useful for shared project directories |
| Sticky bit | 1xxx (e.g., 1777) | Historically prevented swapping; largely obsolete for files | Only the owner can delete their own files (used on /tmp) |
Setuid can give a program the effective identity of its owner while it runs, so only use it for trusted executables and review the program's ownership and behavior. Setgid and sticky-bit behavior also depends on whether the mode is applied to a file or directory and on the operating system.
Symbolic chmod notation
Octal notation sets all nine bits at once. Symbolic notation allows incremental changes without knowing the current permissions:
chmod +x file: add execute permission for all (user, group, other)chmod u+x file: add execute for owner onlychmod go-w file: remove write from group and other-
chmod u=rwx,g=rx,o=r file: set exact permissions symbolically (equivalent tochmod 754) -
chmod a+r file: add read for all;ameans all (same asugo)
In the symbolic result, setuid and setgid use s when their matching execute bit is
on and uppercase S when it is off. The sticky bit uses t or uppercase
T in the same way. For example, 4755 appears as
rwsr-xr-x, while 4644 appears as rwSr--r--.
umask: default file creation permissions
A umask masks selected permission bits from the maximum mode when a process creates
a new file or directory. For a common 022 umask, group and others lose write permission:
- New files: maximum
0666becomes0644(rw-r--r--). - New directories: maximum
0777becomes0755(rwxr-xr-x).
With a more restrictive 027 umask, files default to 0640 and directories
to 0750, so "others" receive no permissions by default.
These umask examples explain how defaults are formed; this calculator converts a mode you choose and does not apply an umask. Actual defaults can also be limited by the program creating the file or directory and by the operating system.
Frequently asked questions
What does chmod mean?
chmod (change mode) is the Unix command to set file permissions. It controls who can read, write, or execute a file.
What is the octal notation?
The final three octal digits encode read (4), write (2), and execute (1) for owner, group, and others. An optional leading digit combines setuid (4), setgid (2), and sticky (1).
What does 755 mean?
755 means the owner has full permissions (rwx = 7), while group and others can only read and execute (r-x = 5).
Related tools
- Git CommandsUse Git Commands to browse and search all common Git commands with.
- Docker Compose GeneratorUse Docker Compose Generator to build docker-compose.yml files visually. Add multiple services with.
- Env File EditorUse Env File Editor to parse .env files, view all key-value pairs in.
- File Hash CalculatorUse File Hash Calculator to calculate SHA-1, SHA-256, SHA-384, and SHA-512 hashes for.