Knowledgebase

File Permissions for Applications Print

  • otherapplicationsscripts, other, permissions, uploads, cpanel, restore, filemanager, woocommerce, caching, support
  • 0

Getting them right.

THE VALUES

  • Directories: 755
  • Files: 644
  • Configuration containing credentials: 600
  • Writable directories the application needs: 755 with correct ownership

NEVER 777

Any process on the server can then modify the file. Our configuration frequently refuses to execute such files anyway.

Documentation instructing you to use 777 is wrong, and an application requiring it should be treated with suspicion.

SETTING THEM IN BULK

In cPanel File Manager, select directories and apply 755 recursively to directories only, then select files and apply 644 to files only.

Applying one value to everything makes every file executable, which is wrong.

WRITABLE DIRECTORIES

Applications need write access to specific places: uploads, cache, storage, temporary directories.

These need 755 with correct ownership, not 777. If an application cannot write with correct ownership, the ownership is wrong rather than the permissions being too restrictive.

IF OWNERSHIP IS WRONG

After a restore or an unusual upload, files may be owned by the wrong user. Open a ticket and we will correct it.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot