Linux Permissions Calculator (chmod)

Convert Linux file permissions between Octal (e.g. 755, 644), Symbolic (e.g. -rwxr-xr-x), and interactive checkboxes with CLI command generation.

User (Owner)
Group
Others (World)

How to Calculate Linux Permissions Online

1

Toggle Checkboxes or Octal Code

Check the Read, Write, and Execute boxes for Owner, Group, and Others, or type an octal number like 755.

2

Real-time Calculation

The calculator instantly updates octal numbers, symbolic strings (`-rwxr-xr-x`), and human descriptions.

3

Copy Command

Click Copy on the generated chmod 755 filename command string.

Tool Options

Octal & Symbolic Conversion

Seamlessly converts numeric octal permissions into 10-character symbolic string notations.

Special Flags Support

Full support for Setuid (4000), Setgid (2000), and Sticky Bit (1000) permission modes.

Preset Shortcuts

One-click shortcuts for standard Linux file modes like 755, 644, 600, 700, and 777.

Your Data Privacy

Web Tool
Privacy-First Architecture
Most of our web tools process your data entirely in-browser. Where server processing is technically required, payloads are evaluated statelessly in-memory and are never stored, saved, or logged.
REST API
Stateless In-Memory Processing
When you use our API endpoints, your requests are processed strictly in-memory without persistent database storage, disk logging, or data retention.
Want to learn more about how we safeguard your information and infrastructure?
Read our full Privacy Policy for detailed security standards, data retention principles, and compliance guarantees.

What does the Linux Permissions Calculator do?

The Linux Permissions Calculator (chmod Calculator) helps DevOps engineers, system administrators, and developers inspect, convert, and construct file permission modes on Linux/Unix systems. It provides interactive checkbox toggles, octal code inputs (e.g. 755, 644), 10-character symbolic notations (e.g. -rwxr-xr-x), special flag options (Setuid, Setgid, Sticky bit), and executable chmod CLI command strings.

Core Concepts

Understanding Linux File Permissions:

  • Triplets: Permissions are assigned across 3 scopes: User (Owner), Group, and Others (World).
  • Permission Digits:
    • Read (r) = 4
    • Write (w) = 2
    • Execute (x) = 1
  • Octal Code: Summing the values yields each digit. For example, rwx = 4+2+1 = 7, r-x = 4+0+1 = 5. Thus 755 grants full permissions to owner, and read/execute to group and others.
  • Special Bits:
    • Setuid (4000): Runs executable with file owner's privileges.
    • Setgid (2000): New files created inside directory inherit the directory's group.
    • Sticky Bit (1000): Prevents users from deleting files owned by others in shared directories (e.g. /tmp).

How to use the tool?

  1. Select Preset or Checkboxes: Pick a common shortcut from Quick Permission Presets (like 755 or 644) or toggle Read, Write, and Execute checkboxes.
  2. Instant Conversion: The tool updates the 3-digit/4-digit octal code, symbolic string notation, and human readable explanation automatically.
  3. Copy Command: Click Copy to grab the resulting chmod 755 file.txt command string.

Related Developer Utilities

If you work with Linux servers and shell scripts, explore these complementary tools:

REST API Integration

Blueutils provides a free REST API endpoint (POST https://blueutils.com/api/linux/chmod-calculator) to programmatically calculate octal permissions and symbolic strings.

API Request Parameters

Name Type Description Example
octal String (Optional) Octal string to convert (e.g. "755" or "0755"). "755"
owner Object / Number (Optional) Owner permissions { read, write, exec } or octal digit 7. { "read": true, "write": true, "exec": true }
group Object / Number (Optional) Group permissions { read, write, exec } or octal digit 5. { "read": true, "write": false, "exec": true }
others Object / Number (Optional) Others permissions { read, write, exec } or octal digit 5. { "read": true, "write": false, "exec": true }
isDirectory Boolean (Optional) Sets leading character to 'd' instead of '-'. Default false. false
filename String (Optional) Filename for command formatting. Default "file.txt". "script.sh"

API Request Payload Examples

cURL

curl -X POST https://blueutils.com/api/linux/chmod-calculator \
  -H "Content-Type: application/json" \
  -d '{
    "octal": "755",
    "filename": "script.sh"
  }'

Python

import requests

url = "https://blueutils.com/api/linux/chmod-calculator"
payload = {
    "octal": "755",
    "filename": "script.sh"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())

Java

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        String jsonPayload = """
            {
                "octal": "755",
                "filename": "script.sh"
            }
            """;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://blueutils.com/api/linux/chmod-calculator"))
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

API Response Parameters

Name Type Description Example
isValid Boolean Indicates whether permission calculation succeeded. true
octal String 3-digit octal permission code. "755"
symbolicNotation String 10-character Linux symbolic notation string. "-rwxr-xr-x"
chmodCommand String Formatted chmod shell command. "chmod 755 script.sh"
humanReadable String Plain-English summary of owner, group, and others rights. "Owner: Read, Write, Execute | Group: Read, Execute | Others: Read, Execute"

API Response Payload Examples

Success Response (HTTP 200 OK)

{
  "isValid": true,
  "octal": "755",
  "octal4": "0755",
  "symbolicNotation": "-rwxr-xr-x",
  "chmodCommand": "chmod 755 script.sh",
  "chmodRecursiveCommand": "chmod -R 755 script.sh",
  "isDirectory": false,
  "humanReadable": "Owner: Read, Write, Execute | Group: Read, Execute | Others: Read, Execute"
}

Validation Failure Response (HTTP 400 Bad Request)

{
  "isValid": false,
  "error": "Invalid octal permissions '999'. Must be a 3 or 4-digit octal string (e.g., '755' or '0755')."
}

Rate Limit Exceeded Response (HTTP 429 Too Many Requests)

{
  "error": "API rate limit exceeded. Please wait or contact support@blueutils.com."
}

Why use an API to calculate Linux Permissions?

Integrating the Permissions Calculator API into automation systems and CI/CD pipelines provides key benefits:

  • Automated Deployment Validation: Validate octal permissions before executing shell provisioning scripts.
  • Ansible & Terraform Integration: Automatically generate octal mode values for infrastructure file modules.

Native Usage

How to convert permissions programmatically across programming environments:

Node.js (JavaScript)

function octalToSymbolic(octal) {
  const map = ['---', '--x', '-w-', '-wx', 'r--', 'r-x', 'rw-', 'rwx'];
  return String(octal).split('').map(d => map[parseInt(d, 10)]).join('');
}

console.log('-' + octalToSymbolic('755'));

Linux (Bash Shell)

#!/bin/bash
MODE="755"
FILE="script.sh"
chmod "$MODE" "$FILE"

Python

def octal_to_symbolic(octal_str):
    mapping = ['---', '--x', '-w-', '-wx', 'r--', 'r-x', 'rw-', 'rwx']
    return '-' + ''.join(mapping[int(d)] for d in octal_str)

print(octal_to_symbolic('755'))

Java

public class ChmodExample {
    public static void main(String[] args) {
        String[] map = {"---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"};
        String octal = "755";
        StringBuilder sb = new StringBuilder("-");
        for (char c : octal.toCharArray()) {
            sb.append(map[Character.getNumericValue(c)]);
        }
        System.out.println(sb.toString());
    }
}

Frequently Asked Questions (FAQ)

How do I convert octal file permissions into symbolic notation?

Enter a 3-digit octal number (e.g. 755) or toggle checkboxes for Owner, Group, and Others. The calculator outputs exact symbolic strings (e.g. -rwxr-xr-x).

What is the difference between 755 and 644 in Linux?

755 (rwxr-xr-x) allows owner read/write/execute, and group/others read/execute (common for executables and directories). 644 (rw-r--r--) allows owner read/write, and group/others read-only (common for standard public files).

How do special permissions like setuid, setgid, and sticky bit work?

Setuid (4000) runs files with owner rights, Setgid (2000) inherits directory group ownership, and the Sticky Bit (1000) prevents non-owners from deleting files in shared directories like /tmp.

Rate Limits

UI Limits
100 uses per 15 minutes
Max payload size: 5 MB
API Limits
5 requests per 60 minutes
Max payload size: 256 KB
Need higher API rate limits, increased payload sizes, or custom developer solutions?
Contact our engineering team at support@blueutils.com for custom rate limit increases, higher quota allocations, or tailored enterprise integrations.