Embed this tool on your site
<iframe src="https://devtoolbox.dedyn.io/tools/chmod-calculator" width="100%" height="700" frameborder="0" title="Chmod Calculator"></iframe>

Chmod Calculator

Interactive Linux file permissions calculator. Toggle checkboxes or type an octal number to convert between numeric and symbolic chmod notation. Supports SUID, SGID, and sticky bit.

Enter 3 or 4 digits (e.g. 755, 0644, 4755)
User
Read (4)
Write (2)
Execute (1)
U Owner
G Group
O Others
$ chmod 755 filename

Octal Permission Reference

Each digit is the sum of its permission values: read (4), write (2), execute (1).

Octal Binary Symbolic Permissions
0000---No permissions
1001--xExecute only
2010-w-Write only
3011-wxWrite + Execute
4100r--Read only
5101r-xRead + Execute
6110rw-Read + Write
7111rwxRead + Write + Execute

Understanding Linux File Permissions

The Permission Model

Linux uses a permission model with three categories of users: the file owner (user), the group assigned to the file, and others (everyone else). Each category can have read (r), write (w), and execute (x) permissions independently. The chmod command changes these permissions.

Octal vs Symbolic Notation

Permissions can be expressed in two ways. Octal notation uses a number where each digit (0-7) represents the combined permissions for owner, group, and others. For example, chmod 755 sets rwx for owner and r-x for group and others. Symbolic notation uses letters: chmod u+x adds execute for the owner, chmod go-w removes write from group and others.

Special Permission Bits

Beyond the basic rwx permissions, Linux supports three special bits. The SUID bit (4000) on an executable causes it to run as the file owner, commonly seen on commands like passwd. The SGID bit (2000) similarly runs with group privileges, and on directories forces new files to inherit the directory's group. The sticky bit (1000) on directories prevents users from deleting files owned by other users — the classic example is /tmp.

Security Best Practices

Follow the principle of least privilege: only grant the permissions that are actually needed. Avoid using chmod 777 in production as it allows anyone to read, modify, and execute the file. Configuration files with sensitive data (database passwords, API keys) should typically be 600 or 400. Web-accessible directories usually need 755 and files 644.

Frequently Asked Questions

What does chmod 755 mean?
chmod 755 sets file permissions so the owner can read, write, and execute (7 = 4+2+1), while the group and others can only read and execute (5 = 4+0+1). In symbolic notation this is rwxr-xr-x. It is the standard permission for directories and executable scripts on Linux systems.
What is the difference between chmod 644 and 755?
chmod 644 (rw-r--r--) allows the owner to read and write, while group and others can only read. chmod 755 (rwxr-xr-x) adds execute permission for all users. Use 644 for regular files (HTML, CSS, config files) and 755 for directories and executable scripts that need to be run.
What are SUID, SGID, and the sticky bit?
These are special permissions in Linux. SUID (Set User ID, octal 4000) makes an executable run with the file owner's privileges. SGID (Set Group ID, octal 2000) makes executables run with the group's privileges, and on directories it causes new files to inherit the directory's group. The sticky bit (octal 1000) on a directory prevents users from deleting files they don't own, commonly used on /tmp.
Keyboard Shortcuts
Ctrl+Enter Apply octal value
Ctrl+Shift+C Copy command
Ctrl+L Reset to 755
? Toggle shortcuts help