Day 077 / Security / Unix Modes

File Permission Explainer

View source ↗Scroll to explore ↓
File Permission Explainer project cover
/ Overview

Translate numeric Unix permissions into symbolic bits and file or directory explanations with a local Python CLI.

NameFile Permission Explainer

ClientIndependent daily build

IndustriesSecurity education

DateDay 077 · November 26, 2026

/ Challenge

Numeric permissions are compact, but the same execute bit has different meaning on a directory. Special bits add another layer, and a mode alone cannot establish effective access.

/ Provided services

Clear thinking.
Practical delivery.

01

Decode the mode

Bit masks separate owner, group and others. Strict validation rejects unsupported syntax rather than guessing.

02

Explain the context

Directory read lists names; execute means search/traversal. Notes distinguish sticky-directory behavior from modifying file contents.

03

Keep the boundary visible

Setuid, setgid and sticky notation includes uppercase markers when execute is absent. Output is educational, not a recommendation or effective-access verdict.

File Permission Explainer feature visual
/ Solution

A dependency-free Python CLI accepts three or four octal digits and a file or directory choice. It emits JSON containing normalized octal notation, symbolic permissions, class-specific grants, special bits and contextual notes. It never accepts filesystem paths, changes permissions or makes network requests. ACLs, parent directories, identity, mount options and security policy remain outside the calculation.

/ Impact

Seven passing tests

All 4,096 modes compared with Python stat

File and directory explanations

No filesystem mutation

Standard library only

/ Tech stack

Python CLI

Argparse and JSON provide deterministic local reports and explicit invalid-input exit codes.

Exhaustive notation check

Seven tests cover all octal modes against stat.filemode, grants, directory meanings, special bits, rejected inputs, warnings and CLI output.

Next project

JWT Claim Inspector

View case study ↗