TOOL-27 · Permissions

chmod & umask calculator

Check boxes, type an octal number, or edit the symbolic string — all three stay in sync. Plus a umask calculator below for default file/directory permissions.

Read
Write
Execute
Owner
Group
Other
rwxr-xr-x
chmod 755 file

umask → default permissions

New files

644 (rw-r--r--)

New directories

755 (rwxr-xr-x)

Why umask never grants execute to new files

umask works by masking bits away from a starting point, never adding them — for files that starting point is 666 (rw-rw-rw-), which has no execute bit to begin with. That's why a freshly-created text file or script is never executable immediately, even with a permissive umask of 000 — you still need a separate chmod +x to make it run. Directories start from 777 instead, since traversing a directory requires the execute bit.

Reading octal as three separate people, not one number

Each digit in a three-digit octal permission is its own read/write/execute sum for one category — owner, group, then everyone else — where read=4, write=2, execute=1 and you add whichever apply. 754 is owner=7 (rwx), group=5 (r-x), other=4 (r--); it's never one number describing the whole file, always three independent 0–7 values side by side.

What does umask 022 actually do?

It removes write permission for group and other from whatever the default would otherwise be — new files land at 644 (rw-r--r--) instead of 666, and new directories at 755 instead of 777. It's the standard default on most Linux distributions.

Why is chmod 777 almost always the wrong answer?

777 grants read, write, and execute to literally everyone on the system, including accounts that have no legitimate reason to modify or run that file — it's a common "make the error go away" fix that actually papers over a permissions or ownership problem worth diagnosing properly instead.

What's the difference between chmod's numeric and symbolic modes?

Numeric mode (chmod 644 file) sets the exact permission from scratch; symbolic mode (chmod u+x file) adjusts specific bits relative to whatever the file already has, without needing to know or restate the rest. Symbolic mode is often safer for a targeted change since it can't accidentally reset bits you didn't mean to touch.