chmod Permission Calculator

Type an octal or symbolic value, or click the permission grid to set owner, group, and other access. Get the exact chmod command instantly.

Share this tool
OctRead (r)Write (w)Execute (x)Value
Owner u
Group g
Other o

Special Bits (setuid / setgid / sticky)

Presets:

Calculating...

Enter an octal or symbolic value, click the grid, or pick a preset — then click Calculate →

How Linux File Permissions Work

Every file and directory in Linux has three permission groups: owner (u), group (g), and others (o). Each group gets three independent bits: read (r = 4), write (w = 2), and execute (x = 1). Adding those bit values gives the octal digit for that group.

for example, chmod 755 means: owner gets 7 (r+w+x = 4+2+1), group gets 5 (r+x = 4+1), others get 5 (r+x = 4+1). The three-digit octal maps directly to the nine-character symbolic string rwxr-xr-x.

A 4-digit octal (e.g. 4755) adds a leading digit for the special permission bits: setuid (4), setgid (2), and sticky (1).

Common chmod Values Reference

OctalSymbolicNameTypical use
755rwxr-xr-xStandard dirDirectories, executables (/usr/bin)
644rw-r--r--Standard fileSource code, config files
600rw-------Private fileSSH private keys, .env files
700rwx------Private execOwner-only scripts
775rwxrwxr-xGroup writable dirCollaborative project directories
664rw-rw-r--Group editableShared project files
777rwxrwxrwxFull accessTemp dirs only — never for sensitive files
400r--------Owner read onlyCertificates, backup files
4755rwsr-xr-xSetuid execSystem binaries (passwd, su)
1777rwxrwxrwtSticky world dir/tmp directory

Special Permission Bits

4000

Setuid

When set on an executable, the file runs with the file owner's privileges rather than the caller's. Used by system programs like passwd and su so non-root users can modify protected resources under careful control.

2000

Setgid

On executables, runs with the file's group privileges. On directories, new files created inside inherit the directory's group instead of the creator's primary group — useful for shared project folders where everyone should own files with the same group.

1000

Sticky bit

On world-writable directories (like /tmp), restricts deletion so that only the file's owner, the directory owner, or root can remove files. Without it, any user could delete another user's files in that directory.

chmod Command Syntax

Octal mode (most common)

chmod 755 /path/to/file

Symbolic mode (add/remove for specific entity)

chmod u+x script.sh Add execute for owner only

Recursive (directories and contents)

chmod -R 755 /path/to/dir/

Check current permissions

ls -la /path/to/file

Change ownership (often paired with chmod)

chown user:group /path/to/file

Frequently Asked Questions

What does chmod 755 mean?

chmod 755 means: the owner has full access (7 = 4+2+1 = read+write+execute), while group and others have read and execute (5 = 4+1 = read+execute) but cannot write. This is the standard permission for directories and executables that should be readable and runnable by everyone but only editable by the owner.

What is the difference between 644 and 755?

The key difference is the execute bit. 644 (rw-r--r--) gives the owner read and write but no execute — correct for regular files like configs and source code. 755 (rwxr-xr-x) adds execute access for all, making it appropriate for directories (which need execute to be searchable) and scripts or binaries that users should be able to run.

When should I use chmod 777?

Almost never. chmod 777 grants full read, write, and execute access to every user on the system. It is acceptable only for temporary scratch directories in isolated environments (like a dev container). On a production server or any multi-user system, 777 is a security risk — any user could overwrite or execute the file. The correct alternative is usually 755 for directories or 755 for executables. if you need group write access, use 775 or 664.

What does the sticky bit do?

The sticky bit (1000) on a directory prevents users from deleting or renaming files they do not own — even if they have write permission on the directory. The canonical example is /tmp, which uses 1777 (rwxrwxrwt): any user can create files there, but only the file's owner or root can delete them.

How do I check file permissions in Linux?

Run ls -la filename to see the symbolic notation, owner, and group. To see the octal value directly, use stat -c "%a %n" filename on Linux or stat -f "%OLp %N" filename on macOS.

Related Developer Tools