Loading...
Changes Saved.
Error Occurred!

KnowledgeBase

Correct Folder and FIle Permissions on PHP scripts

Because we run suPHP (a PHP security module that makes your scripts more secure) and suEXEC it is important to note that the "Permissions" settings (often referred to as CHMOD) on your files and folders may likely be slightly different than stated in the installation instructions of your PHP script. Typically if a script instructs you to set something to 777; here you should use 755 instead (usually folders) and your files should be set to 644 instead of 666.

A quick breakdown before we discuss details:

All FOLDERS that you've been instructed to set 777 should be SET TO 755 INSTEAD.

All FILES that you've been instructed to set 777 should be SET TO 644 INSTEAD (sometimes 666 but usually 644).

Typically in most cases all FILES should be SET TO 644 and all FOLDERS should be SET TO 755.

Rest assured your script will still have the proper read / write access that it needs. Using 777/666 permissions is not necessary in a suPHP environment (in fact, using 777/666 can cause a script to not function properly). 755/644 work just the same here, but are more secure.

WHEN IN DOUBT - Folders should be 755 and files should be 644.

When you install or update your script the 755 setting should automatically take hold and you shouldn't have to go in and manually set your permissions. However, if you do find the need, you can FTP in to your account and (with most FTP software) set the permissions to 755 on any files or folders that your script has told you to set to 777 (and set any files to 644).

If you are confused by this or need further assistance please submit a support ticket here on the HelpDesk.

DO NOT TAKE ANY CHANCES WITH THIS!

A WRONG PERMISSION CAN RENDER YOUR SITE INOPERABLE, OR WORSE!

WE ARE * HAPPY * TO HELP YOU LEARN HOW TO SET PERMISSIONS CORRECTLY IF YOU SUBMIT A TICKET!




Related Articles