DEV Community

Dev Nestio
Dev Nestio

Posted on

I built a browser-only Unix Permissions Calculator — chmod octal & symbolic, visual checkboxes, 79 tests

I always have to look up chmod syntax. I built a free, browser-only Unix Permissions Calculator that converts between octal notation, symbolic notation, and visual checkboxes — instantly.

Live Tool

👉 https://devnestio.pages.dev/unix-permissions-calc/

What it does

  • Visual checkboxes — toggle read/write/execute for owner, group, and others
  • Octal input/output — type 755 and see which bits are set
  • Symbolic input/output — displays rwxr-xr-x format
  • chmod command preview — generates the exact chmod 755 filename command
  • Special bits — setuid, setgid, sticky bit support
  • Common presets — 644, 755, 700, 777 one-click buttons
  • 100% client-side — pure frontend, works offline

How Unix permissions work (quick recap)

Each permission set is 3 bits: read (4), write (2), execute (1)

rwxr-xr-x = 111 101 101 = 755
Enter fullscreen mode Exit fullscreen mode
Octal Symbolic Meaning
7 rwx read + write + execute
6 rw- read + write
5 r-x read + execute
4 r-- read only
0 --- no permissions

The tool handles all combinations including the special bits (the 4th octal digit): setuid (4000), setgid (2000), sticky (1000).

Tech stack

  • Pure Vanilla JS (zero dependencies)
  • Single HTML file
  • CSS Grid for the permission matrix
  • Hosted on Cloudflare Pages

Testing

79 tests, all passing ✅

Tests cover:

  • Octal → symbolic conversion for all 512 combinations
  • Symbolic → octal parsing
  • Checkbox state synchronization with both inputs
  • Special bits (setuid/setgid/sticky) encoding and display
  • Common preset buttons producing correct values
  • chmod command string generation
  • Edge cases: 000, 777, 4755, 2644
  • SEO and accessibility meta tags

Why browser-only?

Permission calculations are pure math — no server needed. The tool is a single HTML file, works fully offline, and your permission values stay local.


All tools at devnestio.pages.dev — free browser-only developer utilities.

Feedback welcome!

Top comments (0)