Chmod Calculator

Tick read, write and execute permissions for owner, group and others to get the octal value, the symbolic notation and a ready chmod command, or type an octal value to see what it means.

Permissions

ClassRead (r)Write (w)Execute (x)Octal
Owner (u)7
Group (g)5
Others (o)5

Result

rwxr-xr-x
chmod 755 script.sh

Use via API

Converts an octal mode into symbolic notation and a chmod command.

GEThttps://enhanced.dev.br/api/v1/calc/chmod
Query string parameters
QueryTypeDescription
mode *string3- or 4-digit octal mode, e.g. "755".
filestringFile used in the generated command.

Request example

curl "https://enhanced.dev.br/api/v1/calc/chmod?mode=755&file=deploy.sh"

Response

{
  "ok": true,
  "data": {
    "octal": "755",
    "symbolic": "rwxr-xr-x",
    "command": "chmod 755 deploy.sh"
  },
  "meta": {
    "version": "v1"
  }
}
  • Errors return { ok: false, error: { code, message } } with an HTTP 4xx/5xx status.
  • Free, no API key required. Limited to 120 requests per minute per IP.
  • CORS enabled: call it straight from the browser on any domain.

How to use

  1. Tick read, write and execute for owner, group and others.
  2. Or type a 3- or 4-digit octal value.
  3. Enable setuid, setgid or the sticky bit if needed.
  4. Copy the generated chmod command.

Use cases

  • Fixing SSH key (600) and executable script (755) permissions.
  • Setting up shared directories with setgid or the sticky bit.
  • Understanding the permissions shown by ls -l.

Technical concepts

Octal notation

Each octal digit is the sum of read (4), write (2) and execute (1) for one class: owner, group and others, in that order. 755 means rwx for the owner (4+2+1) and r-x for group and others (4+1).

Special bits

An extra leading digit sets setuid (4), setgid (2) and sticky (1). setuid runs the file with its owner's permissions, setgid makes new files inherit the directory's group and the sticky bit prevents users from deleting others' files, as in /tmp (1777).

Execute on directories

On directories, x allows entering and accessing files, r allows listing the contents and w allows creating and removing entries.

Frequently asked questions

Which permissions should website files have?

Usually 644 for files and 755 for directories. Avoid 777, which lets any user change the content.

What does the uppercase S in rwSr--r-- mean?

setuid is set but the owner's execute bit is not, a combination that usually has no practical effect.

Related tools