DevBolt
Processed in your browser. Your data never leaves your device.

How do I calculate Unix file permissions (chmod)?

Toggle read, write, and execute checkboxes for owner, group, and others to instantly see the numeric (e.g., 755) and symbolic (e.g., rwxr-xr-x) permission values. You can also enter a numeric value to see which permissions it represents. Everything runs in your browser.

Standard file permissions
Input
Owner: read, write
Group: read
Others: read
Output
chmod 644 file.txt
-rw-r--r--
← Back to tools

Chmod Calculator

Calculate Unix file permissions. Toggle checkboxes or enter an octal code — results update instantly.

RoleReadWriteExecuteValue
Owner6
Group4
Others4
Octal
644
Symbolic
-rw-r--r--
chmod command
chmod 644 filename
Description
Owner: read, write | Group: read | Others: read

Common Presets

About Unix File Permissions

  • Each digit represents permissions for owner, group, and others.
  • Read (4) + Write (2) + Execute (1) = octal digit.
  • Example: 755 = owner rwx, group rx, others rx.
  • Everything runs in your browser — no data is sent over the network.

Tips & Best Practices

Pro Tip

Use symbolic mode for readable, composable permissions

chmod u+rwx,g+rx,o+r is clearer than chmod 754. Symbolic mode lets you add or remove specific permissions without recalculating the full octal number. Use + to add, - to remove, = to set exactly. Symbolic mode is especially useful in scripts where intent matters more than brevity.

Common Pitfall

777 permissions are a security red flag

chmod 777 grants read, write, and execute to everyone — including other users on the server. This is the most common misconfiguration in web deployments. For web files: 644 for files (owner read/write, others read), 755 for directories (owner full, others read/execute). Never use 777 in production.

Security Note

The sticky bit prevents file deletion in shared directories

Setting chmod 1777 on /tmp means any user can create files, but only the file owner can delete them. Without the sticky bit (just 777), any user can delete any other user's files. The sticky bit is the '1' prefix in octal notation or 't' in ls -l output (drwxrwxrwt).

Real-World Example

SUID/SGID bits can be dangerous on executables

chmod 4755 (SUID) makes an executable run as the file owner, not the user who invoked it. This is how /usr/bin/passwd can write to /etc/shadow. Misconfigured SUID binaries are a top privilege escalation vector. Audit SUID files regularly: find / -perm -4000 -type f.

Frequently Asked Questions

How do Unix file permissions work?
Unix file permissions control who can read (r), write (w), and execute (x) files and directories. Permissions are assigned to three groups: the file owner (user), the owner's group, and everyone else (other). Each permission is represented by a bit: read=4, write=2, execute=1. These are summed per group to form a 3-digit octal number. For example, 755 means owner can read+write+execute (7), group can read+execute (5), and others can read+execute (5). The command chmod 755 file.txt sets these permissions. DevBolt's calculator lets you toggle permissions visually and see the resulting octal and symbolic notation.
What does chmod 755 mean?
chmod 755 sets the file permissions to rwxr-xr-x. Breaking it down: 7 (owner) = read (4) + write (2) + execute (1) — full access. 5 (group) = read (4) + execute (1) — can read and execute but not modify. 5 (other) = read (4) + execute (1) — same as group. This is the standard permission for executable scripts, web server directories, and programs that should be readable and runnable by everyone but only editable by the owner. It is one of the most commonly used permission sets in Linux systems.
What is the difference between chmod 644 and chmod 755?
chmod 644 (rw-r--r--) allows the owner to read and write, while group and others can only read. This is the standard permission for regular files like HTML pages, images, configuration files, and documents. chmod 755 (rwxr-xr-x) adds execute permission for all users, making it suitable for executable scripts, programs, and directories. Directories require execute permission for users to list their contents and traverse into them. A common Linux setup uses 755 for directories and 644 for files. Web servers typically need 755 on document root directories and 644 on static files.

Related Inspect Tools