Chmod Calculator - Unix File Permissions

Calculate Unix/Linux file permissions interactively. Click checkboxes to set permissions or enter a numeric value. See numeric, symbolic, and command formats updated in real time.

ReadWriteExecute
Owner
Group
Others
rwxr-xr-x
chmod 755 filename

Permission Breakdown

Owner (7)
Read, Write, Execute
Group (5)
Read, Execute
Others (5)
Read, Execute

How Unix File Permissions Work

Every file and directory on a Unix/Linux system has three sets of permissions controlling who can access it: the owner (the user who created the file), the group (users belonging to the file's group), and others (everyone else on the system). Each set has three permission types:

The numeric (octal) representation sums the permission values. Read (4) + Write (2) + Execute (1) = 7. Read (4) + Execute (1) = 5. Read (4) alone = 4. Each digit in a three-digit chmod value represents one set: owner, group, others.

Common Permission Values

NumericSymbolicMeaningUse Case
755rwxr-xr-xOwner: all; Group/Others: read+executeDirectories, executable scripts, web server folders
644rw-r--r--Owner: read+write; Group/Others: read onlyRegular files, HTML, CSS, images, config files
700rwx------Owner: all; Group/Others: nonePrivate scripts, SSH keys directory (~/.ssh)
600rw-------Owner: read+write; Group/Others: nonePrivate key files, .env files, passwords
775rwxrwxr-xOwner+Group: all; Others: read+executeShared project directories, team workspaces
666rw-rw-rw-All: read+write, no executeRarely used; allows everyone to edit
777rwxrwxrwxAll: full accessTemporary debugging only; never in production
444r--r--r--All: read onlyRead-only config files, public certificates

Symbolic vs Numeric Notation

The chmod command accepts both numeric (octal) and symbolic notation. Numeric notation sets all permissions at once: chmod 755 file. Symbolic notation modifies specific permissions: chmod u+x file (add execute for owner) or chmod g-w file (remove write for group).

# Numeric: set all at once
chmod 755 script.sh

# Symbolic: add execute for owner
chmod u+x script.sh

# Symbolic: remove write for group and others
chmod go-w config.json

# Symbolic: set exact permissions
chmod u=rwx,g=rx,o=rx script.sh

The Symbolic Characters

CharacterPositionMeaning
r1st, 4th, 7thRead permission granted
w2nd, 5th, 8thWrite permission granted
x3rd, 6th, 9thExecute permission granted
-anyPermission not granted

The full symbolic string has 9 characters grouped in threes: rwxr-xr-x = owner (rwx), group (r-x), others (r-x).

Security Best Practices

chmod in Different Contexts

Docker Containers

In Dockerfiles, use RUN chmod +x entrypoint.sh to make scripts executable. Permission issues are a common source of container startup failures.

Git

Git tracks the executable bit. If you add chmod +x to a file, that change appears in git diff and is preserved across clones. Use git update-index --chmod=+x script.sh to set it without modifying the working tree.

CI/CD Pipelines

If a deploy script fails with "Permission denied," add chmod +x deploy.sh before execution, or ensure the file's executable bit is tracked in Git.

Frequently Asked Questions

What does chmod 755 mean?

chmod 755 sets the file so the owner has read, write, and execute permissions (7 = 4+2+1), while the group and others have read and execute permissions (5 = 4+0+1). The symbolic notation is rwxr-xr-x. This is the standard permission for directories, executable scripts, and web server folders.

What is the difference between chmod 644 and chmod 755?

chmod 644 (rw-r--r--) gives the owner read and write permissions; group and others get read-only. chmod 755 (rwxr-xr-x) adds execute permission for all three categories. Use 644 for regular files (documents, images, configs) and 755 for directories and scripts that need to be executed.

How do Unix file permissions work?

Every file has three permission sets: owner, group, and others. Each set controls three access types: read (4), write (2), and execute (1). The numeric chmod value sums the granted permissions for each set. For example, 7 = read+write+execute, 5 = read+execute, 4 = read-only, 0 = no access. The three digits represent owner, group, and others in order.

What does chmod 777 mean and is it safe?

chmod 777 grants read, write, and execute permissions to everyone on the system. This is almost never safe in production because any user or process can modify or execute the file. Use it only for temporary debugging on isolated development machines. For production, use 755 for directories/executables and 644 for regular files.

Related Generate Tools