Chmod mode convert
chmod-mode-convert · version 1.0.0 · Developer tools · free, no key needed
Convert a Unix permission mode and apply explicit chmod symbolic clauses, returning canonical octal and symbolic forms.
Use when you need to: convert chmod mode · apply symbolic chmod clauses · octal to symbolic permissions.
Decide before calling
Read the versioned contract and the supported scope below. Reuse chmod-mode-convert@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use chmod-mode-convert@1.0.0 for convert chmod mode. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- convert chmod mode
- apply symbolic chmod clauses
- octal to symbolic permissions
- symbolic permissions to octal
- calculate chmod result
- evaluate Unix file mode
Not supported
- applying permissions to a filesystem object
- ACLs, umask-dependent omitted-who clauses, or platform-specific permission extensions
Behavior
- mode is either exactly four octal digits (special, user, group, other) or exactly nine rwx characters; symbolic s/S and t/T encode special bits.
- clauses is optional and defaults to no changes; otherwise it is a comma-separated sequence with explicit u/g/o/a, one of +-=, and one or more rwxXst or u/g/o copy letters.
- Clauses run left to right. Copy and X inspect the mode at the start of their clause; X adds execute only for a directory or when any execute bit is already set.
- An omitted who is rejected so no platform-dependent umask participates; s affects selected u/g classes and t affects selected o (including a).
Input
mode(string, required): min length 4; max length 9clauses(string, optional): min length 3; max length 256is_directory(boolean, optional): defaultfalse
Output
octal(string, required): pattern^[0-7]{4}$symbolic(string, required): min length 9; max length 9
Limits
- max mode bytes: 9
- max clauses bytes: 256
- max clauses: 32
Example
Request input:
{
"mode": "0644",
"clauses": "u+x,g+w"
}
Response:
{
"result": {
"octal": "0764",
"symbolic": "rwxrw-r--"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "chmod-mode-convert",
"version": "1.0.0",
"input": {
"mode": "0644",
"clauses": "u+x,g+w"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/chmod-mode-convert/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"mode":"0644","clauses":"u+x,g+w"}'
The machine-readable contract is at /v1/tools/chmod-mode-convert/versions/1.0.0.
CLI
node cli.mjs run chmod-mode-convert 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Editorconfig resolve: Resolve EditorConfig properties for one normalized relative POSIX path from caller-supplied file contents.
- Commit conventional parse: Parse one Conventional Commits 1.0.0 message into its header, body, footers, and breaking-change status.
- Openapi operation extract: Extract one OpenAPI operation, merge inherited parameters, and return its local component-reference closure.
- Shell argv quote: Quote inert argv strings for POSIX sh or PowerShell 7, returning a command and its per-argument fragments.
- Sql statements split: Split SQL text into exact statement spans with explicit PostgreSQL, MySQL, or SQLite lexical rules.
- Tap output parse: Parse TAP version 13 text into ordered assertions, plan validity, diagnostics, directives, and bailout state.