permissions and limiting PHP file modifications

team_dale

Member
Jul 9, 2014
12
1
3
cPanel Access Level
Root Administrator
We run a lot of wordpress sites and as usual, clients aren't great at updating their plugins.

What we find is that a lot of php files get modified after an exploit is - exploited, with malicious code being spidered into legitimate files, and also files being created that are 100% malicious code.

We have a way around this on non cPanel servers by just setting everything to read only for websites. However when we do this on a cPanel site, everything fails spectacularly.

On these read-only servers, we do all the plugin updates on a development box and then push to live.

Is there a way to make all the files folders (except for the uploads folder) read only on cpanel?
 

georgeb

Well-Known Member
May 23, 2010
49
1
58
Montreal, QC, Canada
cPanel Access Level
Root Administrator
You, like admin, have to control any files that are uploaded. If the user is not updating the software block access to that folder so the user will let you know they can't access their files. I recommend the CXS scanner from Configserver.

Regards
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
We have a way around this on non cPanel servers by just setting everything to read only for websites. However when we do this on a cPanel site, everything fails spectacularly.
Hello,

The limitation isn't necessarily with cPanel, but with Apache and the PHP handler you are using. You can read more about the permission requirements with the various PHP handlers at:

PHP Handlers - EasyApache - cPanel Documentation

Thank you.