Home » Categories » Multiple Categories

What are the correct file permissions for a PHP file?

Your PHP files should have one of two possible permissions: 644 or 600.

644: If the file is going to be called through your web browser (for example, www.your-domain.com/index.php), it needs to be world-readable. Do not include important passwords or secret API keys in your world-accessible files, as this can provide access for hackers and malicious scripts.

600: If you have PHP files that are not directly accessed through the web browser, and are only referenced in other PHP files, it needs to be only readable by the owner. This is good for include files and files that contain important passwords and API keys.

You can adjust the file permissions in your FTP client or through the File Manager.

To adjust permissions in File Manager:

  1. Log into your eXtend Control Panel
  2. Click ‘File Manager’
  3. Double-click the directories until you are in the one that contains your script
  4. Click on your script
  5. Click on the Padlock icon (Chmod)
  6. Enter in 644 or 600 next to ‘Or enter a mode number’
  7. Click ‘Save’
0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
Related Articles
What is Java and what can it do?
Added on Fri, Mar 13, 2015
Where is the dictionary directory?
Added on Mon, Mar 16, 2015
What Java support is in place on your servers?
Added on Mon, Mar 16, 2015
What is the server path?
Added on Mon, Mar 16, 2015
What is ASP?
Added on Fri, Mar 13, 2015