ToolsSmall calculators that run in the browser

JPNAS.NET / Tools

🐧 Chmod Calculator

Linux file permissions: tick the boxes or type a number like 755 or a string like rwxr-xr-x – and get the command.

Permissions

Command

How the numbers work

Each of the three groups – owner, group, others – gets a digit: read = 4, write = 2, execute = 1, added together. So 7 = rwx, 6 = rw-, 5 = r-x, 4 = r--.

NumberMeaningTypical use
644rw-r--r--normal files, web pages
755rwxr-xr-xfolders, scripts and programs
600rw-------private files: SSH keys, passwords, config with secrets
700rwx------private folders, ~/.ssh
777rwxrwxrwxalmost never a good idea – everybody can change everything

For folders, "execute" means "may enter the folder". The optional fourth digit in front sets the special bits: setuid (4), setgid (2) and sticky (1) – for example 1777 on /tmp. More Linux commands are on the Linux cheat sheet.