sonicsam

Member
Apr 5, 2012
14
0
51
cPanel Access Level
Root Administrator
I am using Mod_Security but finding lots of problems with running with mod_ruid2 so I have been considering disabling mod_ruid2 and enabling suphp in easyapache but if I do all the sites show permissions errors (which makes sense I guess).

Is there and easy way to fix this without having to check every site?
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,977
153
368
SLC
cPanel Access Level
DataCenter Provider
use below at you own risk but have used many times with no issues

Change all permissions for folders from 777 to 755
find /home/*/public_html -type d -exec chmod 755 {} \;

Change all permissions for files from 666 to 644
find /home/*/public_html -type f -exec chmod 644 {} \;

Remove any php_value and php_flag entries in .htaccess files as they will produce an Internal Server Error if in an account's .htaccess
find /home -type f -name '.htaccess' -exec grep -Hrn 'php_value' '{}' \;
find /home -type f -name '.htaccess' -exec grep -Hrn 'php_flag' '{}' \;

after you find the php directive above either remove them or relocate them to the clients php.ini

after you have completed you can tail your Apache error_log
to see if there is anything else that may be out of wack

since your running mod_ruid2 no need to seach for nobody files :)

=======================================

and an even easier method is to switch CloudLinux & cageFS

and enable LSAPI and no need to switch anything