Chmod file permission calculator avatar

Chmod file permission calculator

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Chmod file permission calculator

Chmod file permission calculator

Decode Unix file permissions between octal and symbolic form, apply chmod expressions like u+x,go-w to a base mode, and turn a umask into the defaults new files and directories get. One row per calculation with both notations, per class flags, special bits, a ready chmod command and a note.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

Mangudäi

Mangudäi

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Share

Work out Unix file permissions without leaving your browser or guessing at bits. Give it a mode and it returns the octal form, the symbolic form, what each class can do, the special bits, a ready chmod command, and a short security note. It also applies chmod expressions to a starting mode and turns a umask into the defaults new files and directories receive.

Everything runs offline as plain arithmetic. No API key, no login, no external service. The same input always gives the same answer, so it never breaks.

What it does

Three calculation types, mixed freely in a single run:

decode reads a mode and explains it. Pass octal like 755, 0755 or 4755, or symbolic like rwxr-xr-x or -rw-r--r--. You get both notations back plus the per class breakdown, so it doubles as an octal to symbolic converter and back.

chmod applies a symbolic expression to a base mode the way the command line does. Base 644 with expression u+x,go-w returns 744. It understands u, g, o, a, the +, - and = operators, r, w, x, the conditional X, and the s and t special bits.

umask converts a umask into the permissions new files and new directories start with. A umask of 022 gives files 644 and directories 755.

Input

Send a calculations array. Each item is one calculation.

{
"calculations": [
{ "type": "decode", "mode": "755" },
{ "type": "decode", "mode": "-rw-r--r--" },
{ "type": "decode", "mode": "4755" },
{ "type": "chmod", "base": "644", "expression": "u+x,go-w" },
{ "type": "umask", "umask": "022" }
]
}

You can leave out type. If an item has an expression it is treated as a chmod, a umask field makes it a umask, and anything else is a decode. Run it with no input and it uses a set of worked examples so you can see the shape of the output straight away.

Output

One row per calculation, written to the dataset with a table view. Key columns:

  • octal and symbolic: the mode in both notations, for example 755 and rwxr-xr-x
  • owner, group, other: the three permission triads
  • setuid, setgid, sticky: the special bits as true or false
  • description: a plain reading, for example "Owner: read, write, execute. Group: read, execute. Others: read, execute."
  • command: a copy and paste chmod command
  • notes: a security flag when something stands out, such as a world-writable or setuid mode
  • ok and error: a bad input returns an error row and the run keeps going

Each row also carries the finer detail: the four digit octal with the special digit, the ten character symbolic string with the file type, every read, write and execute flag on its own, and for umask rows the separate file and directory defaults.

How the permission math works

A Unix mode is four octal digits. The first is the special set (setuid 4, setgid 2, sticky 1) and the next three are owner, group and other, each built from read 4, write 2 and execute 1. Symbolic notation writes the same thing as rwx triads, with s or S marking setuid and setgid and t or T marking the sticky bit. This actor converts between the two, applies chmod clauses, and masks the base defaults with a umask. The conditional X sets execute only when execute is already present somewhere in the base mode, matching how the command behaves on files.

Good to know

The output describes permissions, it does not change any file. Use the command column to apply a mode on your own system. The security notes point out common risks like world-writable files and setuid binaries, but they are a quick check, not a full audit.