Cloud/DevOps

How to Set Linux File Permissions with chmod

Linux file permissions control who can read, write and run a file. The chmod command sets them, usually as a three-digit number. Each digit stands for the owner, the group and everyone else, in that order.

Last updated: 2 November 2026

Open Chmod Calculator →

Step-by-step

  1. Decide what the file or directory is for, such as a web page, a script or a private key.
  2. Open the Chmod Calculator and tick Read, Write and Execute for the owner, group and others, or type the number.
  3. Copy the command, for example chmod 755 filename.
  4. Run it on the file and check the result with ls -l.
  5. Test that the application or user still has the access it needs.

How the numbers work

Each permission has a value: read is 4, write is 2 and execute is 1. Add them for each class. Read and write is 6, read and execute is 5, and all three is 7. So 755 means the owner can read, write and execute, while the group and others can read and execute.

Common modes

644 is typical for regular files: the owner can edit, everyone else can read. 755 suits directories and scripts that others need to run. 600 keeps a file private to its owner, which SSH requires for private keys. 700 is common for the .ssh directory.

Directories need execute

A directory needs the execute permission before anyone can enter it or reach the files inside. A directory with read but no execute lets people list names but not open anything.

Changing many files safely

Avoid chmod -R 755 on a whole tree, because it makes ordinary files executable. Set directories and files separately: find . -type d -exec chmod 755 {} + and find . -type f -exec chmod 644 {} +. Avoid 777 on shared or production servers, since it lets every user modify the file.

USE THE TOOL

Finish the task with DevUtilityKits

Use the relevant online utility, check the result, and continue with your development workflow.

Open Chmod Calculator →
FAQ

Frequently asked questions

What does chmod 755 mean?

The owner can read, write and execute. The group and others can read and execute.

What does chmod 644 mean?

The owner can read and write. The group and others can only read.

Why does SSH reject my private key?

SSH requires the key file to be private. Set it to 600 with chmod 600.

Is chmod 777 safe?

Usually not. It gives every user full access, so choose a narrower mode.