File and folder permissions explained Print

  • 0

Permissions control who can read, change or run each file and folder. The right permissions keep your site working and secure. The wrong ones can cause errors like "403 Forbidden" or "500 Internal Server Error".

The short version

ItemRecommended
Folders755
Files (HTML, PHP, images, CSS…)644
Sensitive config files (e.g. wp-config.php)600 or 640
Never use 777. It lets anyone change the file. It's a security risk and the server may refuse to run PHP files with this permission.

What the numbers mean

Each number has three digits, one each for the User (you), the Group and the World (everyone else). Each digit adds up: Read = 4, Write = 2, Execute = 1.

  • 6 = read + write
  • 5 = read + execute
  • 4 = read only

So 644 means you can read and write and everyone else can only read.

Change permissions in File Manager

  1. In File Manager, select the file or folder.
  2. Click Permissions in the toolbar.
  3. Tick the boxes or type the number, then click Change Permissions.

The Change Permissions window showing 644 for a file

In FileZilla, right-click a file and choose File permissions…. See How to connect with FileZilla.

Seeing an error?

  • 403 Forbidden: check that the folder is 755 and the files are 644 and that there's an index.html or index.php file.
  • 500 Internal Server Error after uploading: check permissions on the PHP files and whether you recently changed .htaccess.

Was this answer helpful?

« Back