Skip to content
Mediawand

Chmod Calculator

Work out the permissions for a file or folder without doing octal in your head. Tick the boxes, type a number like 644, or paste rwxr-xr-x from ls -l: everything stays in sync.

How to calculate chmod permissions

  1. 1Tick read, write and execute for the owner, the group and others, or type the octal or symbolic form.
  2. 2Add special bits if you need them.
  3. 3Copy the chmod command.

How the numbers work

Read is 4, write is 2 and execute is 1; add them for each of owner, group and others. 7 (4+2+1) is everything, 5 (4+1) is read and execute, so 755 means the owner can do everything and everyone else can read and run.

Special bits

A fourth digit in front adds setuid (4), setgid (2) and sticky (1). They show as s and t in symbolic form, like rwsr-xr-x for 4755 or rwxrwxrwt for 1777, the setting of /tmp.

Common choices

644 for ordinary files, 755 for programs and folders, 600 for private files and 400 for SSH keys. Avoid 777, which lets anyone change the file.

Frequently asked questions

Is anything sent to a server?
No. Everything runs in your browser.
What does execute mean for a folder?
Permission to enter it and reach the files inside; read lets you list its contents.
Can I paste a line from ls -l?
Yes. The leading - or d for the file type is ignored.

Related tools

Loading tools…