Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cpanel:enable-suphp [2010-05-20 17:42:58]
garrett.plasky
cpanel:enable-suphp [2012-10-25 23:54:23]
shaun.reitan [Converting to suPHP Tips and Tricks]
Line 25: Line 25:
  
 This setting is not retroactive for any files/directories with incorrect nobody ownerships, so you'll need to log into the server as root and fix those manually. Also while you're in there you can tighten down directory permissions as described above! This setting is not retroactive for any files/directories with incorrect nobody ownerships, so you'll need to log into the server as root and fix those manually. Also while you're in there you can tighten down directory permissions as described above!
 +
 +==== Converting to suPHP Tips and Tricks ====
 +
 +=== Fixing Permissions on files and folders ===
 +
 +When converting to suPHP one of the common problems admins see is customer websites showing "internal server errors" Many times this is caused by incorrect permissions being set on the files and directories.  The below code will help correct these permission problems by setting PHP files to 0600, directories to 0711, and files/directories to the proper user.group.
 +
 +<code console>
 +cd /var/cpanel/users/
 +/scripts/chownpublichtmls
 +for i in *;do find /home/$i/public_html -iname "*.php" -exec chmod -v 600 {} \;; find /home/$i/public_html/ -type d -exec chmod -v 711 {} \;;done
 +</code>
  
 {{tag>how-to php suphp}} {{tag>how-to php suphp}}