File permissions explained (644, 755 and why never 777)

What Linux file permissions mean, the correct values for website files and folders, and how to change them in DirectAdmin.

Guide2 min readLast updated
On this page
  1. Reading the numbers
  2. Correct values for websites
  3. Why 777 is dangerous
  4. Changing permissions
  5. Wrong permissions cause
  6. If it doesn’t work
  7. Common questions

Permissions decide who can read, write and execute a file.

Reading the numbers

Three digits: owner, group, everyone else. Each digit adds up:

ValuePermission
4Read
2Write
1Execute (for folders: enter)

So 7 = read + write + execute, 6 = read + write, 5 = read + execute, 4 = read.

Correct values for websites

ItemPermissionMeaning
Folders755You can change; others can enter and read
Files644You can change; others can read
Sensitive config (e.g. wp-config.php)640 or 600Tighter, if the site still works
Anything777Never

Why 777 is dangerous

It lets any process write to the file, making it easy for malicious code to modify or plant files. Hosting software designed for your account doesn’t need it. If a tutorial says to use 777, use 755 (folder) or 644 (file) instead.

Changing permissions

  1. In System Info & Files › File Manager, select the file or folder.
  2. Choose Permissions (or Set Permission).
  3. Enter the value, such as 644, and save.

Wrong permissions cause

Prefer to follow along?

If it doesn’t work

These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.

Common questions

What are file permissions and what should mine be?

Permissions decide who can read, write or run a file. On shared hosting, folders should be 755 and files 644. Never set anything to 777 — it allows the whole server to write to the file and is a genuine security risk.

This is a general web-hosting explanation, not specific to Traxio.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going