Chmod Calculator
This free chmod calculator turns ticked permissions into the octal number and the rwx text that Linux uses, and back again, so you can write the right chmod command. For website files, 644 is the usual mode for files and 755 for folders.
| Read | Write | Execute | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Worked out in your browser. Nothing you enter is sent to us. To change a whole folder tree, add -R, but be careful: folders and files usually need different modes.
Free, no signup.
How Linux file permissions work
Every file and folder on a Linux server has three sets of permissions: one for the owner, one for the group and one for everyone else, called others. Each set can allow reading, writing and running (called execute). On a folder, read means you can list what is inside, write means you can add or remove files, and execute means you can open it.
You change them with the chmod command. It needs two things: the permissions you want and the file or folder to apply them to. The calculator above builds the permissions part for you, and the command line underneath is ready to copy.
Octal and symbolic notation
Octal is the short form. Read counts as 4, write as 2 and execute as 1, and you add them up for each set. Read plus write is 6, read plus execute is 5, and all three make 7. So 755 means the owner gets 7 (everything), while the group and others get 5 (read and run). Three digits cover owner, group and others in that order.
Symbolic notation is the long form that you see in a directory listing: rwxr-xr-x is the same mode as 755. A dash means the permission is off. You can type either one into the calculator, tick boxes, or press a preset, and the others follow along. A fourth digit at the front (for example 4755) holds the special bits.
Safe permissions for websites
The usual safe pair for a website is 644 for files and 755 for folders. The owner can change things, and the web server can read them. PHP scripts do not need the execute bit on most hosting setups, so 644 is fine for them too.
Files that hold passwords, such as wp-config.php or an .env file, deserve tighter permissions: 600, or 640 if the web server runs as the file's group. Never use 777. It lets every user on the server change the file, and it is often the quickest way for a hacked plugin to spread. If an installer or a plugin tells you to set 777, the real fix is almost always the correct owner, and 755 or 775.
setuid, setgid and the sticky bit
Three extra bits sit in front of the usual digits. Setuid (4) makes a program run with its owner's rights instead of the rights of whoever starts it. Setgid (2) does the same with the group, and on a folder it makes new files inherit the folder's group. The sticky bit (1) on a folder means only a file's owner can delete or rename it, even if others can write there. That is how /tmp is set up: 1777.
In the rwx text, these show up as s or t in the execute position. A capital S or T means the special bit is on but the execute bit beneath it is off, which is rarely what you want. Most website owners never need any of these, so treat setuid as something to leave alone unless you know why you need it.
Frequently asked questions
What does chmod 755 mean?
The owner can read, write and run the file or folder. The group and everyone else can read and run it, but not change it. It is the normal mode for folders and scripts on a web server.
What does chmod 644 mean?
The owner can read and write, and everyone else can only read. It is the normal mode for ordinary website files such as HTML, images and PHP files.
Is chmod 777 safe?
No. It lets every user on the server read, change and run the file. Use 755 for folders and scripts and 644 for files, and fix the file's owner if something still cannot write to it.
What permissions should wp-config.php have?
600 is the safest choice, so only the owner can read it. 640 also works if your web server reads the file as the file's group. Do not leave it readable by others, since it holds your database password.
What do the letters s, S, t and T mean in rwxr-xr-x style text?
A lower-case s or t means the special bit (setuid, setgid or sticky) is on and the execute bit is on too. A capital S or T means the special bit is on but execute is off.
How do I change permissions on a whole folder?
Add -R to the command, for example chmod -R 755 foldername. Take care, because it gives files the same mode as folders. A common safer pattern is to set folders to 755 and files to 644 with two separate commands.
Is anything I type sent to a server?
No. The calculator runs in your browser and nothing you enter is uploaded. Only the mode is written to the page address so you can share a link.
Dig deeper
Htpasswd Generator
Turns a username and password into a bcrypt or APR1-MD5 .htpasswd line, entirely in your browser.
Generate a lineCron Expression Generator
Build crontab schedules from dropdowns, or paste one to read it in plain English with its next runs.
Build a scheduleHtaccess Generator
Build an .htaccess file for HTTPS, www, redirects, security headers, caching and blocked IPs, ready to upload.
Build .htaccess