Menu

Search tools and guides

DMARC & DKIMCheck DMARC and DKIM, generate records and keys
SPF Record CheckerValidate SPF and count lookups against the limit of 10
DNS Blacklist CheckerCheck IPs and mail servers against spam blocklists
Email Header AnalyserTrace hops, delays and SPF/DKIM/DMARC in raw headers
Email ValidatorSyntax, MX, SPF and DMARC verification
DNS LookupQuery A, AAAA, MX, TXT, NS and more
WHOIS LookupRegistration data over RDAP
Website StatusAvailability and response-time checks
Ports ReferenceWhat runs on each TCP and UDP port, and if it's safe
MAC Address LookupFind a MAC address vendor and check if it's random
Download Time CalculatorHow long a file takes at your broadband speed
QR Code GeneratorQR codes for Wi-Fi, links and text, as PNG or SVG
User Agent ParserWhat your browser says about itself, decoded
IP ConverterDecimal, hex, binary and IPv6 conversion
Subnet CalculatorCIDR ranges, masks and subnet splitting
CIDR AggregatorMerge IPs and ranges into the fewest CIDR blocks
SSL CheckerInspect certificates, chains and expiry
HTTP HeadersAudit security headers and redirect chains
Password GeneratorCryptographically secure random passwords
Hash GeneratorMD5, SHA-1, SHA-256, SHA-384 and SHA-512
JWT DecoderDecode JWT claims and verify HS256, RS256, ES256
Unix Timestamp ConverterConvert epoch seconds or ms to UTC and UK time
UUID GeneratorGenerate UUID v4, v7 and ULIDs; decode any UUID
Cron Expression ExplainerCron schedules in plain English, with next runs
Regex TesterTest JavaScript regex with live match highlighting
Chmod CalculatorUnix permissions as octal, symbols and commands
Colour Contrast CheckerWCAG contrast ratio for text and background colours
JSON FormatterPretty-print, minify and validate JSON
Base64 EncoderConvert to and from Base64, Unicode safe
URL EncoderPercent-encode and decode URL strings
HTML EntitiesEscape and unescape HTML special characters
Text Diff CheckerCompare two texts line by line, word by word
Word & Character CounterWords, characters, reading time and SMS segments
Case ConverterUPPER, lower, Title Case, camelCase and more
URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs
DNS records explained: A, AAAA, CNAME, MX, TXT, NS and the restWhat each common DNS record type does, the rules that trip people up – CNAMEs at the root, MX pointing at an IP – and how TTL and caching really work.
Mbps and MB/s: why downloads look slower than your broadband speedWhy a 100 Mbps line downloads at 12 MB/s, why a 1 TB drive shows 931 GB, what slows real transfers, and what a UK advertised average speed promises.
Setting up SPF, DKIM and DMARC for Microsoft 365Step by step for a domain on Microsoft 365, from the first SPF record to a DMARC policy of reject, avoiding the mistakes that cause bounces.
SPF "too many DNS lookups": why it happens and how to fix itWhat the ten-lookup limit in RFC 7208 counts, how to tally your own record, and the fixes that work without silently breaking mail.
How to read a DMARC aggregate reportA field-by-field tour of the XML that receivers send to your rua= address, and how to turn it into a list of senders to fix before you enforce.
What your IP address reveals – and what it does notHow IP geolocation really works, why it often puts you in the wrong town, what a website can and cannot learn from your address, and how UK law treats it.
Diagnosing a website that will not load: DNS, TLS and HTTP in orderA methodical checklist for working out whether an outage is DNS, the certificate, the server or just you – and what each kind of failure looks like.

Arrow keys move through results, Enter opens one, Escape closes.

Chmod Calculator

Work out Unix file permissions in either direction: tick the boxes, type an octal mode such as 755, or paste a string from ls -l. The chmod command is ready to copy.

3 or 4 digits, each from 0 to 7: 755, 0644 or 4755.

Nine characters such as rwxr-xr-x, or the first column of ls -l such as -rw-r--r-- or drwxr-xr-x.

Presets:
Permissions
Read 4Write 2Execute 1Digit
Owner u6
Group g4
Others o4
Special bits

What this mode allows

Numeric command
Symbolic command

Replace file with your own path. On a directory, "run" means entering it and reaching the files inside.

About the Chmod Calculator

Every file and directory on Linux, macOS and other Unix-like systems carries a mode: a small set of bits saying who may read it, change it or run it. The chmod command sets that mode, and it accepts two notations, octal numbers such as 755 and letters such as u=rwx,g=rx,o=rx. This calculator converts between the two, the rwxr-xr-x string printed by ls -l, and a grid of tick boxes, and explains in a sentence what the result allows.

How to use it

  1. Tick the boxes for the access you want, or type a mode into either field. Everything else updates to match.
  2. To read an existing mode, paste the first column of ls -l, for example -rw-r--r--. The leading character is the file type (- for a file, d for a directory) and is ignored.
  3. Read the sentence and any warning under the grid, then copy the numeric or symbolic command.
  4. Use Copy link to share a mode. The link carries only the octal number, as ?mode=755.

Three classes, three bits

Permissions are set separately for three classes of user: the owner of the file (u), members of the file's group (g), and others (o), meaning every other account on the system. Each class has three bits: read (r), write (w) and execute (x). Only one class applies to any one person. If you own the file, the owner bits decide; otherwise, if you are in its group, the group bits decide; otherwise the others bits do.

How the octal digits add up

Each class is written as one digit, made by adding 4 for read, 2 for write and 1 for execute. The three digits are then written in the order owner, group, others.

rwx = 4 + 2 + 1 = 7
r-x = 4 + 0 + 1 = 5
rw- = 4 + 2 + 0 = 6
r-- = 4 + 0 + 0 = 4

rwxr-xr-x = 755
rw-r--r-- = 644

Execute on a file and on a directory

On a file, execute means the file can be run as a program. A script also needs read permission, because the interpreter has to read it; that is why a script started by a scheduled job (see the cron explainer) is usually 755 or 700. On a directory the bits mean something different. Read lets you list the names inside. Execute lets you enter the directory and reach the files in it. Write, together with execute, lets you create, rename and delete entries. Deleting a file therefore depends on the permissions of the directory that holds it, not on the file's own. Directories nearly always need execute wherever they have read, which is why they are 755 where files are 644.

Setuid, setgid and the sticky bit

A fourth digit in front holds three special bits, added up the same way.

  • Setuid (4): a program with this bit runs with the identity of the file's owner, not of the person who started it. It is how passwd can update a file only root may write. Linux ignores it on scripts.
  • Setgid (2): a program runs with the file's group. On a directory it makes new files inherit the directory's group, which is useful for shared project folders.
  • Sticky (1): in a directory, a file can be deleted or renamed only by its owner, the directory's owner or root. /tmp is 1777 so that everyone can create files there without being able to remove each other's.

In ls -l these appear in the execute position as s or t. A capital S or T means the special bit is set but the execute bit underneath it is not.

Sensible permissions for a website

On shared hosting the usual settings are 644 for files and 755 for directories: you can change them, and the web server can read them. Configuration files holding secrets, such as wp-config.php or .env with a database password in it, are better at 600 when PHP runs under your own account, or 640 when the web server reaches them through the group. If one of those passwords is weak, the password generator will make a better one.

777 is never the fix. It lets every account and every process on the server rewrite your files, so one compromised site on the machine can alter another. When a script cannot write to a directory, the cause is nearly always ownership: the file belongs to a different user from the one the script runs as. Correct the owner, or give group write (775 or 664) to a group you share with it. Some servers, those using suEXEC for example, refuse outright to run a script that is writable by group or others.

Why SSH rejects a readable key

OpenSSH checks the mode of a private key before using it. If the group or others have any access, it prints "UNPROTECTED PRIVATE KEY FILE" and ignores the key. Set the key to 600 (or 400) and the ~/.ssh directory to 700. The server is strict too: by default it ignores authorized_keys if that file, ~/.ssh or your home directory is writable by group or others.

Umask

The umask decides the mode of newly created files. Programs normally ask for 666 on a new file and 777 on a new directory, and the umask lists the bits to take away. With the common umask of 022, files come out as 644 and directories as 755; with 077 they come out as 600 and 700. The umask affects creation only, and a numeric chmod sets exactly the mode you give it.

Limitations

  • The mode is not the whole story. Access control lists (shown as a + after the mode in ls -l), SELinux or AppArmor policies and immutable flags can all grant or deny access on top of it, and root is not held back by read and write bits at all.
  • Only the owner of a file, or root, can change its mode. If chmod says "Operation not permitted", look at ownership first.
  • Windows does not use this model; NTFS has its own access control lists. File systems such as FAT and exFAT store no per-file permissions, so chmod has no lasting effect on them.
  • Both commands normally set the mode exactly. There are two exceptions: on BSD and macOS the symbolic command does not clear a sticky bit that is already set, and GNU chmod leaves the setuid and setgid bits of a directory as they were, with either command, unless you remove them explicitly, for example with chmod g-s.
  • The calculator cannot see your files. It describes what a mode means, not what is currently set on your server.

Privacy

The calculation runs in JavaScript in your browser. Nothing is sent to a server. The octal mode is placed in the page address so that a link reproduces what you see; no file names or paths are involved.

Common questions

What does chmod 755 mean?

chmod 755 gives the owner read, write and execute permission, and gives the group and everyone else read and execute only. Each digit adds 4 for read, 2 for write and 1 for execute, so 7 is rwx and 5 is r-x, which ls -l prints as rwxr-xr-x. It is the usual mode for directories and for scripts.

What does chmod 777 mean, and why is it risky?

chmod 777 gives read, write and execute permission to the owner, the group and every other account on the system. It is risky because any user or process on the machine can then change or replace the file, so on a shared server one compromised site can alter another. Correcting the file's owner, or using 775, is nearly always the better fix.

What does chmod +x do?

chmod +x adds execute permission to a file so that it can be run as a program or script, leaving the read and write bits as they were. Written like this it normally applies to the owner, the group and others; chmod u+x limits it to the owner. A script also needs read permission before it will run.

What is the difference between chmod and chown?

chmod changes a file's permissions, while chown changes who owns it. chmod sets the read, write and execute bits for the owner, the group and others; chown assigns the file to a different user or group, and changing the owner normally needs root. When a program cannot write to a file, the cause is often the wrong owner rather than the wrong mode.

Accessibility

Adjust how the site looks and behaves. Your choices are saved in this browser only.

Colour theme
Text size
Accessibility statement