Hosting
Servers
Web Development Pricing
Resources
Get started → Log in
Home/Calculators/Chmod calculator

Chmod calculator
for Linux file permissions.

Tick the boxes or type a number like 755 or rwxr-xr-x. You get the chmod command, ready to copy. It runs in your browser and sends nothing anywhere.

This is a
Permissions for owner, group and others
Read 4Write 2Execute 1
Owner
Group
Others
Common values
chmod 755 filename
chmod -R 755 folder

In ls -l this shows as -rwxr-xr-x

Recursive -R applies the same mode to every file and folder inside, so files get the execute bit too. For web folders, set folders and files separately, as shown below.

What does chmod do?

chmod (change mode) sets who can read, write or run a file or folder on Linux, macOS and other Unix systems. Every file has three groups of users: the owner, the group and others (everyone else). Each group gets its own mix of three permissions: read, write and execute.

How the octal numbers add up

Each permission has a value: read is 4, write is 2 and execute is 1. Add the ones you want for each group and you get one digit. Three groups give three digits.

  • 7 = 4 + 2 + 1 = read, write, execute
  • 6 = 4 + 2 = read, write
  • 5 = 4 + 1 = read, execute
  • 4 = read only, 0 = nothing

So 755 means owner 7 (full), group 5 (read and execute), others 5 (read and execute). The same mode written as letters is rwxr-xr-x.

Common chmod values

NumberLettersTypical use
644rw-r--r--Normal files: you edit, everyone can read
755rwxr-xr-xFolders and scripts or programs
600rw-------Private keys, .env files, secrets
700rwx------Private folders, such as ~/.ssh
775rwxrwxr-xShared folders for a trusted group
664rw-rw-r--Shared files for a trusted group
777rwxrwxrwxAvoid. Everyone can change it

What execute means on a directory

On a file, execute means you can run it as a program. On a directory it means you can enter it and reach what is inside. Read on a directory lets you list the names, and write lets you add, rename or delete entries. A folder with r-- but no x is almost useless, which is why folders are normally 755 or 700, not 644.

Setuid, setgid and the sticky bit

A fourth digit in front sets special bits: setuid is 4, setgid is 2 and sticky is 1. 4755 is rwsr-xr-x.

  • Setuid (4): the program runs as its owner, not as the user who started it. Shows as s in the owner execute spot. A capital S means setuid is set but execute is not.
  • Setgid (2): a program runs as its group. On a directory, new files inherit the folder's group. Shows as s in the group spot, for example 2750 is rwxr-s---.
  • Sticky bit (1): on a directory, only a file's owner (or root) can delete or rename it. This is why /tmp is 1777, rwxrwxrwt. Shows as t, or T if others lack execute.

WordPress file permissions

As general guidance, WordPress folders are usually 755 and files 644. Keep wp-config.php tighter, at 600 or 640, because it holds your database password. The user running the web server must be able to read the files, so if the owner is wrong, fix it with chown first. Avoid 777 anywhere. To set them in one go from your site folder:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 600 wp-config.php

chmod vs chown

chmod changes what an owner, group and others may do; chown changes who the owner and group are.

How to read ls -l

Run ls -l and each line starts with ten characters, like -rwxr-xr-x. The first is the type: - for a file, d for a directory, l for a link. The next nine are owner, group and others, three each. Paste them in the Symbolic box above to get the octal number.

Using chmod on your own server

On a RapidServer Linux VPS you get full root access, so chmod and chown work on every file you manage. Connect over SSH (see SSH kya hai), and new to the system? Start with Linux kya hai. VPS plans start at ₹581/mo plus 18% GST. More free tools are on the calculators page.

Want a Linux server to practise on?

KVM VPS in Mumbai or Delhi NCR with full root, NVMe storage and daily backups.

VPS plans dekhiye

Chmod questions

What does chmod 755 mean?+
The owner can read, write and execute; the group and others can read and execute but not write. It is the usual mode for folders, scripts and programs.
What is the difference between chmod 644 and 755?+
Only the execute bit. 644 (rw-r--r--) is for ordinary files that are read, not run. 755 (rwxr-xr-x) adds execute so a script can run and a folder can be opened.
Is chmod 777 safe?+
No. It lets every user and every process on the machine change or replace the file. On a server, a bug or a hacked site can then overwrite your files. Work out which user needs access and give only that, usually 755 or 644, or 775 or 664 for a trusted group.
How do I chmod a directory and everything inside it?+
Use chmod -R 755 folder. Be careful: it gives files the execute bit as well. To set folders and files differently, use the two find commands in the WordPress section above.
What does the sticky bit do?+
On a shared folder, it stops users from deleting or renaming files that belong to someone else, even if they can write to the folder. Set it with chmod +t folder or the leading 1, as in chmod 1777 folder.
What does rwxr-xr-x mean?+
Owner: read, write, execute. Group: read, execute. Others: read, execute. In numbers, that is 755.
Why do I get "Operation not permitted" when I run chmod?+
Only the file's owner or root can change its mode. Check the owner with ls -l, then run the command as that user or with sudo.

Run Linux with full root access.

KVM VPS in Mumbai or Delhi NCR, billed monthly in rupees with a GST invoice.

Chat with sales