Chmod Calculator

Toggle Linux file permission bits and read both numeric and symbolic chmod.

Open tool

Overview

Toggle the nine standard Unix permission bits (owner/group/other × read/write/execute) plus the special bits (setuid, setgid, sticky), and read both the numeric (octal) and symbolic forms side by side. Type a number like 755 and the checkboxes flip to match; flip checkboxes and the number updates live.

It's for developers and sysadmins who set file modes every day and still pause for a second on 0o2755 vs 0o4755. Reach for it when writing a Dockerfile COPY --chmod=, configuring an installer, locking down an SSH key, or just sanity-checking what chmod u+rwx,g+rx,o+r path resolves to.

How it works

Unix file permissions are encoded in 12 bits: three special bits (setuid 4000, setgid 2000, sticky 1000) and three sets of rwx (owner 400/200/100, group 40/20/10, other 4/2/1). The numeric form is the octal sum; the symbolic form spells out each set as rwx letters, with s, S, t, or T indicating special bits with or without execute.

chmod itself accepts both forms. Numeric mode sets every bit absolutely; symbolic mode (u+x, g-w, a=r) merges relative changes against the current state.

Examples

  • Common file mode (everyone read, owner write):
    644  ->  rw-r--r--
    
  • Common executable mode (owner full, others read+exec):
    755  ->  rwxr-xr-x
    
  • Setuid root binary (e.g. passwd):
    4755  ->  rwsr-xr-x
    
  • Sticky directory (e.g. /tmp):
    1777  ->  rwxrwxrwt
    

FAQ

What's the difference between setuid and setgid on a directory?

On a file, setuid/setgid make the executable run with the file owner's UID/GID. On a directory, setgid makes new files inherit the directory's group (useful for shared project trees); setuid on directories is generally ignored by Linux.

Should I ever use chmod 777?

Almost never. World-writable files are a security smell - they let any local user clobber your data. Use group permissions plus setgid on a shared directory instead.

Why does chmod g+s file show S not s?

Capital S (or T) means the special bit is set but the execute bit isn't. Files showing S got setgid without group-execute, which usually wasn't intended.

What's the umask?

It's a mask of bits to subtract from the default mode when new files are created. A umask of 022 produces 644 files and 755 directories.

Try Chmod Calculator

An unhandled error has occurred. Reload ×