Tell me more about CHMOD file permissions

  • September 13, 2017
  • 0 Comments

CHMOD (Change Mode) is the file permission system used by UNIX based servers which we also use. The permissions appear as a set of 3 numbers in a row. In order of appearance, the numbers represent user, group, and other’s access level.

Without going into too much detail, here are some basic examples of the most commonly used permissions.

  • 755 = Can be viewed and executed by anyone, can only be modified by the user.
    • This is most commonly used on folders and can be used as a substitute for 777 on our servers.
  • 644 = Can be viewed by anyone, but can only be changed by the user.
    • This would be used for php and other file types.
  • 444 = Can be viewed by anyone, can’t be modified without changing the CHMOD.
    • This would be used for protecting configuration files.
    • Note: This permission can’t be set via FTP

Another permission level that is mistakenly used often is 777. Using this permission level is very dangerous because it means that anyone can read, execute and change the file. In fact our servers have implemented security measures on files that have 777 permissions. Any attempts to use permission 777, 757 or 775 may  cause an error 500 page to appear when trying to access that file in a browser. You can confirm this by checking the cPanel error log, by which you will see entries similar to the following:

 [Wed Aug 22 12:49:42 2012] [error] [client 76.120.239.238] SoftException in Application.cpp:264: File “/home/user/public_html/test.php” is writeable by others
 or

 [Wed Aug 22 12:49:23 2012] [error] [client 76.120.239.238] SoftException in Application.cpp:256: File “/home/user/public_html/test.php” is writeable by group

Note: If a script or application requests you to use 777 permissions, you can substitute it with 755 on our servers and it should work correctly.


How helpful was this article to you?