API & MCP

Everything a person can do on Unix Permission Calculator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Unix Permission Calculator

Converts Unix file modes between octal (755, 4755), symbolic (rwxr-xr-x) and ls -l strings, explains what owner, group and others may do, applies chmod expressions such as u+x,g-w,o=r or a+X to a base mode exactly like GNU chmod, and computes default file and directory modes from a umask.

Inputs of Unix Permission Calculator
FieldTypeDefaultDescription
mode (required)text—Mode. Octal (644, 0755, 4755), symbolic (rwxr-xr-x) or an ls -l string (drwxr-sr-x, -rw-r--r--@).
chmodtext—chmod expression to apply (optional). Symbolic clauses (u+x, go-w, a=rX, g=u, u+s, +t) or a numeric mode, applied to the mode above.
isDirectorybooleanfalseIt is a directory. Affects X, the meaning of r/w/x and GNU's handling of setuid/setgid on directories. ls -l strings starting with d set this automatically.
umasktext—umask (optional). Shows the default modes for new files (666 & ~umask) and directories (777 & ~umask).

Example request

755 explained

curl -X POST https://unixpermissioncalculator.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"755"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "unix-permission-calculator": { "type": "http", "url": "https://unixpermissioncalculator.usefulweb.site/mcp" }
  }
}