chmod Calculator
Calculate Unix permissions instantly.
Presets
Symbolic
Generated Command
Edit filename to copyWhat this permission means
- Owner can read, write, and execute.
- Group can only read and execute. Write is not allowed.
- Others can only read and execute. Write is not allowed.
Preview in ls -la
-rwxr-xr-x 1 user group 1234 Apr 2 23:00 filenameSecurity Assessment
Looks good. Standard permission for web server directories.
What is chmod?
chmod (change mode) is a Unix command used to set or modify the access permissions of files and directories. Every file on a Unix or Linux system has three permission classes β owner, group, and others β and three permission types β read, write, and execute. Permissions protect sensitive data and prevent unauthorized modification. Understanding chmod is fundamental to Linux system administration, web server configuration, SSH key management, and general security hardening. Common permission patterns include 644 for web files, 755 for directories and executable scripts, and 600 for private keys.
3 Classes (Who)
- Owner: The user who created the file, or whoever last took ownership with chown. The owner always retains the ability to change permissions with chmod regardless of the current settings.
- Group: All users who belong to the same group as the file, as configured in /etc/group. Group permissions are useful for team collaboration β for example, giving a group of developers read-write access to a shared codebase or log directory.
- Others: Everyone else on the system who is not the owner and not in the file's group. Also called 'world' permissions. In production environments, these should generally be kept at read-only (r) or none at all.
3 Permissions (What)
- Read (4): View the file's contents with cat, less, or a text editor. For directories, list the contents with ls. Numeric value: 4.
- Write (2): Modify the file's contents or delete it. For directories, create, rename, or remove files within it. Numeric value: 2.
- Execute (1): Run the file as a program or shell script. For directories, enter the directory with cd and traverse into its subdirectories. Numeric value: 1.
Add the values for each class: read (4) + write (2) = 6, read (4) + write (2) + execute (1) = 7, read (4) + execute (1) = 5. Combining three class values gives the octal notation: 644 means owner=rw (6), group=r (4), others=r (4); 755 means owner=rwx (7), group=rx (5), others=rx (5). In symbolic notation, 644 appears as -rw-r--r-- and 755 as -rwxr-xr-x in ls -la output. The most widely used patterns are 644 for static web files, 755 for directories and scripts, 600 for SSH private keys, and 700 for owner-only executables.