Linux Chmod Permissions Calculator
Visually calculate Linux octal and symbolic file permissions, configure SetUID/SetGID/Sticky bits, audit world-writable security risks, and copy safe chmod & chown commands.
Linux Chmod Permissions Calculator: the tool
No world-writable bits are enabled. This follows standard Linux least-privilege permissions for production servers.
Recommendation: Pair with accurate file ownership (`chown`) so your web or app service runs as a dedicated non-root user.
Permission Bit Matrix
| Scope | Read (4) | Write (2) | Execute (1) | Octal |
|---|---|---|---|---|
Owner (u) File creator / owner | 7 | |||
Group (g) Assigned group members | 5 | |||
Public / Others (o) All other system users | 5 |
Octal, Symbolic & CLI Output
chmod 755 /var/www/app/chmod u=rwx,g=rx,o=rx /var/www/app/sudo chown www-data:www-data /var/www/app/Hardening Linux VPS deployments, Docker containers, or CI/CD pipelines?
DEESU configures zero-downtime cloud infrastructure, least-privilege server hardening, and automated deployment workflows.
How it works
How Linux Octal and Symbolic File Permissions Work
Every file and directory on a POSIX or Linux filesystem stores a 12-bit permission mode divided into four octal digits: Special Bits (SetUID, SetGID, Sticky), Owner (u), Group (g), and Others (o). Each of the three standard scopes combines three binary flags whose decimal weights sum cleanly into a single octal digit between 0 and 7.
Read (r) has a weight of 4, Write (w) has a weight of 2, and Execute (x) has a weight of 1. Because 4, 2, and 1 are powers of two, every sum maps uniquely to one combination of flags: 7 (4+2+1) grants full rwx, 6 (4+2) grants rw-, 5 (4+1) grants r-x, and 4 grants read-only r--. When you run ls -l, Linux renders those exact bits as a 10-character symbolic string such as -rw-r--r-- (a regular file with mode 644) or drwxr-xr-x (a directory with mode 755).
Files vs. Directories: Why Execute (x) Means Something Different
A common point of confusion for engineers deploying Linux servers is why web directories need 755 while the HTML, CSS, or .env files inside them only need 644 or 600. On regular files, the Execute (x) bit permits the kernel to run the file as a program or shell script. Giving a static image, JSON config, or PHP template execute permission is unnecessary.
On directories, however, the three permission bits govern directory operations rather than program execution:
- Read (
r, 4) on a directory allows listing filenames inside it (e.g., runningls). - Write (
w, 2) on a directory allows creating, renaming, or deleting files inside it (requiresxto take effect). - Execute (
x, 1) on a directory is the 'traverse' or 'search' bit—it allowscdinto the directory and accessing known file paths inside it. Withoutx, even reading a readable file inside the folder fails with Permission Denied.
Understanding Special Permission Bits: SetUID, SetGID, and Sticky Bit
The optional leading fourth octal digit controls three advanced Linux kernel behaviors. SetUID (4xxx, shown as s in the owner execute slot) causes an executable binary to run with the file owner's user ID rather than the caller's—classic examples include /usr/bin/passwd and sudo. SetGID (2xxx, shown as s in the group execute slot) is especially useful on shared team directories: new files created inside a 2775 directory automatically inherit the directory's group instead of the creator's primary group.
The Sticky Bit (1xxx, shown as t in the others execute slot) protects shared directories like /tmp (1777). Even though every user can create files inside /tmp, the sticky bit ensures users can only delete or rename files they personally own (or if they are root).
Production Security Hardening: Why You Should Never Use chmod 777
When troubleshooting Nginx, Docker volume mounts, or PHP/Node.js upload errors, reaching for chmod -R 777 is one of the most dangerous habits in DevOps. Mode 777 grants every local user and compromised background daemon unrestricted write and execute access. On a multi-tenant host or web server, an attacker exploiting a minor read/write bug in another service can immediately overwrite your application scripts or plant a web shell.
Instead, solve permission errors by aligning ownership (chown -R appuser:appgroup /var/www/app) and applying least-privilege modes: 755 for directories, 644 for public static assets, 600 for .env secrets and SSH private keys (~/.ssh/id_ed25519), and 400 for immutable TLS private keys.
Questions, answered
~/.ssh/id_ed25519 or .pem cloud keys) to protect against credential theft on shared servers. If Group or Others have any read, write, or execute bits set (such as 644 or 664), SSH aborts with 'WARNING: UNPROTECTED PRIVATE KEY FILE'. Setting chmod 600 (owner read/write) or chmod 400 (owner read-only) immediately resolves the error.644 (-rw-r--r--) lets the owner read and edit a file while everyone else can only read it—ideal for static web assets, config files, and source code. Mode 755 (-rwxr-xr-x or drwxr-xr-x) adds the Execute bit for all three scopes, which is required for directories (to allow traversal) and executable scripts or binaries.s (SetUID/SetGID) or t (Sticky Bit) means the special bit AND the underlying execute (x) bit are both enabled. An uppercase S or T indicates that the special bit is set WITHOUT the corresponding execute bit (for example, 4644 produces -rwSr--r--).chmod -R 755 makes every file executable, which is undesirable. Instead, combine find with chmod: run find /var/www/app -type d -exec chmod 755 {} + for directories, and find /var/www/app -type f -exec chmod 644 {} + for regular files.0644 explicitly clears all three special bits, whereas 3-digit 644 leaves existing special bits untouched on some systems. Explicit 4-digit notation is preferred in automation scripts, Dockerfiles, and Ansible/Terraform manifests.Related reading and help
Cloud & DevOpsThe 2026 Docker Run to Compose Migration & Container Hardening Guide: Rootless, Healthchecks & Compose Spec v2
Migrate docker run commands into hardened Docker Compose specs. Learn rootless setups, atomic healthchecks, secret mounts, and container escape prevention.
Nov 4, 20267 min read
Cloud & DevOpsKubernetes Cost Optimization in 2026: Karpenter vs Cluster Autoscaler & KEDA Event-Driven Scaling
Slash Kubernetes cloud compute bills by 45% in 2026. Compare Karpenter vs Cluster Autoscaler, right-size node provisioning, and master KEDA autoscaling.
Nov 8, 20267 min read- Cloud & DevOps
What the Cloudflare Containers Flaw Reveals About Multi-Tenant Container Security
Cloudflare's Containers disk flaw exposed leftover cross-tenant data. Here's what it means for multi-tenant container security and vetting platforms.
Sep 29, 20268 min read - DEESU serviceCloud & DevOpsDeployment and CI/CD pipelines across AWS, Azure, and GCP — infrastructure that scales without a rewrite.See the service
More free tools
- Open Graph & social meta tag generatorGenerate and test Open Graph, Twitter Card, and SEO meta tags with live previews for Google, X, LinkedIn, and Facebook.
- Google Play & App Store fee calculatorCalculate your exact take-home payout, compare standard 15% vs 30% cuts, and test if external billing saves money.
- App cost calculatorEstimate a price range for an Android app or website from its features, in your local currency.
- Google Play launch checklistAn interactive checklist covering the store listing, policies, quality checks and release steps.
- Project brief generatorAnswer a few questions and get a clear, copyable brief you can send to any development team.
- App privacy policy generatorAnswer a few questions and get a plain-English privacy policy and a delete-account page for your Android or iOS app.
- App icon generatorUpload one image and download every Android, iOS and favicon size, with adaptive icon safe-zone checks.
- Play Store listing optimizerCheck your title, short and full description against keyword, readability and Google Play policy rules.
- LLM token & cost calculatorForecast production AI API expenses across OpenAI, Anthropic & DeepSeek. Model prompt caching savings and routing arbitrage.
- JWT debugger & security inspectorDecode, verify, and audit JSON Web Tokens for alg:none bypasses, key confusion attacks, expiry status and leaked secrets.
- Cron expression generator & explainerBuild, validate and translate crontab schedules for Linux, AWS EventBridge, GitHub Actions and Kubernetes.
- JSON to TypeScript & Zod converterInstantly convert raw API JSON payloads into clean TypeScript interfaces and production Zod v3 validation schemas.
- Docker Run to Docker Compose converterConvert raw docker run commands into production Docker Compose v2 YAML with automated security hardening and healthchecks.
- cURL to Code converter (Fetch, Axios, Python, Go)Translate cURL commands into JavaScript fetch, Axios, Python requests, Go, Rust, and Node.js with 100% in-browser privacy.
- SVG optimizer & React JSX converterMinify and clean vector SVGs, strip Figma metadata, and convert to production React JSX, React Native, or Vue components.
- Regex tester, debugger & ReDoS auditorTest regular expressions live with capture groups, replace previews, plain-English explanations, and catastrophic backtracking detection.
- JSON formatter, validator & diff viewerBeautify, validate, minify, sort keys, and compare two JSON payloads side by side with nested JSONPath diff inspection.
- SQL formatter & query linterBeautify PostgreSQL, MySQL, SQLite, and T-SQL queries and catch SELECT *, missing WHERE clauses, and slow non-sargable scans.
- CSS to Tailwind v4 converter & OKLCH paletteConvert raw CSS declarations to Tailwind v4 utility classes and generate accessible 50–950 OKLCH color scales with @theme export.
- Base64, URL, HTML & SHA-256 hash toolkitEncode/decode Base64 (UTF-8 & URL-safe), URLs, HTML entities, Hex, and generate SHA-256, SHA-512 & HMAC signatures offline.
- UUID v7, UUID v4, ULID & NanoID generatorBulk generate cryptographically secure RFC 9562 UUID v7, UUID v4, ULID, and custom NanoIDs and decode embedded timestamps.
- Robots.txt generator & AI bot blockerBuild valid robots.txt rules, control GPTBot, ClaudeBot, and CCBot AI crawlers, declare sitemaps, and test URL paths live.
- CSP & HTTP security headers generatorGenerate strict Content-Security-Policy, HSTS, and Permissions-Policy configs for Next.js, Vercel, Nginx, Apache, and Cloudflare.
- Markdown table & GitHub README builderCreate formatted Markdown tables visually, import CSV/TSV spreadsheets, and build GitHub alert callouts and Shields.io badges.
Tell us what you're building.
Send the problem, not a polished brief. We'll tell you what it actually takes to ship it: stack, timeline and cost, before you commit to anything.