{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"unix-permissions"},"result":{"entity_type":"calculator","id":"unix-permissions","calculator_id":"unix-permissions","canonical_url":"https://tttkmbb.com/developer/unix-permissions","name":"Unix Permissions Calculator","title":"chmod Calculator – Convert Octal File Modes (755, 0644) to Symbolic Permissions (rwxr-xr-x) and Back","category":"developer","category_name":"Developer & IT","tool_name":"convert_unix_permissions","featured_mcp_tool":false,"description":"Converts a Unix/Linux file mode between octal (755, 0644, 4755) and symbolic (rwxr-xr-x, -rw-r--r--, u=rwx,g=rx,o=rx) notation and explains the read/write/execute bits for owner, group and others plus the setuid, setgid and sticky bits.","use_when":"You need the chmod command for a permission string seen in ls -l, or want to know what an octal mode such as 4755 grants.","do_not_use_when":"You need ACLs (getfacl/setfacl), Windows NTFS permissions, or umask arithmetic (subtract the umask bits from 666/777 manually).","inputs":[{"name":"mode","label":"Mode","type":"string","required":true,"description":"Octal mode with 3 or 4 digits (755, 0644, 4755, 0o755), a 9-character symbolic string optionally preceded by a file-type character (rwxr-xr-x, -rw-r--r--, drwxr-sr-x), or chmod assignments (u=rwx,g=rx,o=rx).","example":"755"}],"outputs":[{"name":"octal","label":"Octal mode","type":"string","decimals":4,"description":"Three digits, or four when setuid/setgid/sticky are set (e.g. 4755)."},{"name":"symbolic","label":"Symbolic mode","type":"string","decimals":4,"description":"Nine characters as shown by ls -l (s/S and t/T mark the special bits)."},{"name":"owner","label":"Owner (user)","type":"string","decimals":4,"description":"Permissions of the file owner."},{"name":"group","label":"Group","type":"string","decimals":4,"description":"Permissions of the owning group."},{"name":"others","label":"Others","type":"string","decimals":4,"description":"Permissions of everyone else."},{"name":"setuid","label":"Setuid","type":"boolean","decimals":4,"description":"Executable runs with the owner's user id (octal 4000)."},{"name":"setgid","label":"Setgid","type":"boolean","decimals":4,"description":"Executable runs with the group id; new files in a directory inherit its group (octal 2000)."},{"name":"sticky","label":"Sticky bit","type":"boolean","decimals":4,"description":"Only a file's owner may delete or rename it inside the directory (octal 1000)."},{"name":"chmod_command","label":"chmod (octal)","type":"string","decimals":4,"description":"Equivalent chmod command with the octal mode."},{"name":"chmod_symbolic","label":"chmod (symbolic)","type":"string","decimals":4,"description":"Equivalent chmod command using u=, g=, o= assignments."},{"name":"explanation","label":"Numeric explanation","type":"string","decimals":4,"description":"How each octal digit is built from read (4), write (2) and execute (1)."}],"input_schema":{"type":"object","properties":{"mode":{"description":"Octal mode with 3 or 4 digits (755, 0644, 4755, 0o755), a 9-character symbolic string optionally preceded by a file-type character (rwxr-xr-x, -rw-r--r--, drwxr-sr-x), or chmod assignments (u=rwx,g=rx,o=rx).","type":"string","examples":["755"]}},"additionalProperties":false,"required":["mode"]},"output_schema":{"type":"object","properties":{"octal":{"description":"Three digits, or four when setuid/setgid/sticky are set (e.g. 4755).","type":"string"},"symbolic":{"description":"Nine characters as shown by ls -l (s/S and t/T mark the special bits).","type":"string"},"owner":{"description":"Permissions of the file owner.","type":"string"},"group":{"description":"Permissions of the owning group.","type":"string"},"others":{"description":"Permissions of everyone else.","type":"string"},"setuid":{"description":"Executable runs with the owner's user id (octal 4000).","type":"boolean"},"setgid":{"description":"Executable runs with the group id; new files in a directory inherit its group (octal 2000).","type":"boolean"},"sticky":{"description":"Only a file's owner may delete or rename it inside the directory (octal 1000).","type":"boolean"},"chmod_command":{"description":"Equivalent chmod command with the octal mode.","type":"string"},"chmod_symbolic":{"description":"Equivalent chmod command using u=, g=, o= assignments.","type":"string"},"explanation":{"description":"How each octal digit is built from read (4), write (2) and execute (1).","type":"string"}}},"formula":"digit = 4·read + 2·write + 1·execute for owner, group, others; special digit = 4·setuid + 2·setgid + 1·sticky; mode = special·512 + owner·64 + group·8 + others","method":"Follows the POSIX mode bits as documented in the GNU coreutils manual; an uppercase S or T in a symbolic string means the special bit is set without the corresponding execute bit.","sources":[{"name":"GNU coreutils manual – chmod: Change access permissions","url":"https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html","type":"reference","retrieved_at":"2026-09-24"},{"name":"GNU coreutils manual – File permissions (mode bits, numeric modes)","url":"https://www.gnu.org/software/coreutils/manual/html_node/File-permissions.html","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"755","inputs":{"mode":"755"},"expected":{"octal":"755","symbolic":"rwxr-xr-x","owner":"read, write, execute","group":"read, execute","others":"read, execute","setuid":false,"chmod_command":"chmod 755 file","chmod_symbolic":"chmod u=rwx,g=rx,o=rx file"},"url":"https://tttkmbb.com/api/v1/calculate/unix-permissions?mode=755"},{"name":"rw-r--r--","inputs":{"mode":"rw-r--r--"},"expected":{"octal":"644","symbolic":"rw-r--r--","owner":"read, write","group":"read","others":"read","sticky":false,"chmod_command":"chmod 644 file"},"url":"https://tttkmbb.com/api/v1/calculate/unix-permissions?mode=rw-r--r--"}],"faq":[{"q":"What does the leading digit in 4755 mean?","a":"The fourth (leading) digit holds the special bits: 4 = setuid, 2 = setgid, 1 = sticky. 4755 is rwsr-xr-x: everyone can run the program with the owner's privileges, as with /usr/bin/passwd."},{"q":"What is the difference between 755 and 0755?","a":"None; the leading 0 is the C/shell octal prefix. 0o755 (JavaScript/Python style) is accepted too."},{"q":"Why does ls show a capital S or T?","a":"A capital letter means the special bit is set but the execute bit in that position is not (e.g. rw-r-Sr-- = 2644), which is usually a mistake."}],"tags":["chmod calculator","unix permissions","file permissions","octal to rwx","755","setuid"],"related":[{"calculator_id":"base-converter","reason":"Octal ↔ binary arithmetic behind the mode bits."},{"calculator_id":"bitwise-operations","reason":"Mode bits are combined with AND/OR masks."}],"links":{"html":"https://tttkmbb.com/developer/unix-permissions","markdown":"https://tttkmbb.com/developer/unix-permissions.md","json":"https://tttkmbb.com/developer/unix-permissions.json","api":"https://tttkmbb.com/api/v1/calculate/unix-permissions","schema":"https://tttkmbb.com/api/v1/calculators/unix-permissions","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T03:44:16Z"}