Skip to content
Toolcroft

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.

EntityRead (4)Write (2)Execute (1)Octal
Owner7
Group5
Other5
Special permission bits
rwxr-xr-x
chmod 755 <file>

Common presets

How to use this tool

  1. Toggle read, write, and execute permissions for the owner, group, and others.
  2. Use the setuid, setgid, and sticky controls to add special permission bits.
  3. The octal mode, symbolic notation, and chmod command update instantly.
  4. 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

OctalBinaryPermissions
0000--- (none)
1001--x (execute)
2010-w- (write)
3011-wx (write + execute)
4100r-- (read)
5101r-x (read + execute)
6110rw- (read + write)
7111rwx (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

BitOctalEffect on filesEffect 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 only
  • chmod go-w file: remove write from group and other
  • chmod u=rwx,g=rx,o=r file: set exact permissions symbolically (equivalent to chmod 754)
  • chmod a+r file: add read for all; a means all (same as ugo)

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 0666 becomes 0644 (rw-r--r--).
  • New directories: maximum 0777 becomes 0755 (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).

Browse all developer tools