Free online tools to generate, calculate,
convert, format, encode, and play.
 

Chmod Calculator

Unix file permissions calculator. Convert between octal and symbolic notation, set permissions visually, and generate chmod commands.


File Permissions

Read
Write
Execute
Owner
Group
Others
Octal notation: 755
Symbolic notation: rwxr-xr-x
File listing (ls -l): -rwxr-xr-x
chmod 755 filename
chmod u=rwx,g=rx,o=rx filename

Umask Preview

See what permissions new files and directories will have with a given umask value.

644 (rw-r--r--)
755 (rwxr-xr-x)
umask 022

How Unix Permissions Work

Permission Types

Every file and directory has three sets of permissions for three classes of users:

  • Owner (u): The user who owns the file
  • Group (g): Users in the file's group
  • Others (o): All other users

Each class can have three permission types:

r Read (4) — view contents
w Write (2) — modify contents
x Execute (1) — run as program
Octal Notation

Permissions are represented as a 3 or 4-digit octal number. Each digit is the sum of its permission values (read=4, write=2, execute=1):

  • 7 = rwx (4+2+1)
  • 6 = rw- (4+2)
  • 5 = r-x (4+1)
  • 4 = r-- (4)
  • 0 = --- (no permissions)
Special Permissions
  • Setuid (4xxx): Run file as the owner. Shows as s in owner execute position
  • Setgid (2xxx): Run file as group, or inherit group on new files in directory. Shows as s in group execute position
  • Sticky bit (1xxx): Only owner can delete files in directory. Shows as t in others execute position
Umask

The umask is a mask that removes permissions from newly created files and directories. It is subtracted from the base permissions (666 for files, 777 for directories). A umask of 022 means new files get 644 and new directories get 755.

Common Permission Sets
  • 755 (rwxr-xr-x) — Executable files, directories
  • 644 (rw-r--r--) — Regular files, config files
  • 700 (rwx------) — Private directories
  • 600 (rw-------) — Private files (e.g., SSH keys)
  • 777 (rwxrwxrwx) — Full access (generally avoid)
  • 444 (r--r--r--) — Read-only for everyone
  • 1777 (rwxrwxrwt) — Shared directories (/tmp)


Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with