SOLVED wordpress --operation permitted

Operating System & Version
centos 7
cPanel & WHM Version
11.100.0.11

nagyhegy

Member
Jan 18, 2021
9
1
3
Baja
cPanel Access Level
Root Administrator
Hello!

I have a problem, and I hope you can help me. I have more accounts on my whm server and one of my costumer can't update his wp page.

[23-Feb-2022 04:07:43 UTC] PHP Warning: chmod(): Operation not permitted in .../public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 173

The file and folder permissions are fine in my opinion. What could be wrong?

thanks
 

Attachments

cPanelWilliam

Administrator
Staff member
Mar 13, 2018
169
28
153
Houston
cPanel Access Level
Root Administrator
Hey there! Often times permissions issues such as this can be caused by using a PHP Handler that is not compatible with the file ownership/permissions of the website. Can you confirm whether your server is using the CGI PHP Handler with mod_suexec or mod_ruid2? You can check the current PHP Handlers via WHM > MultiPHP Manager > PHP Handlers.

It is important to ensure that your server is running scripts as the user by installing something like SuPHP or mod_suexec because otherwise, this can lead to file permissions issues on your websites. For reference:

What's the importance of running scripts as the user?
 

cPanelWilliam

Administrator
Staff member
Mar 13, 2018
169
28
153
Houston
cPanel Access Level
Root Administrator
@nagyhegy based on the screenshots, it does appear your domain is using CGI which causes Apache to run processes as the nobody user. I would recommend ensuring that your server either has mod_ruid2 or mod_suexec installed to ensure Apache processes run under the cPanel user.

You can install mod_ruid2 or mod_suexec via WHM > EasyApache 4 > Customize > Apache Modules > Search for mod_suexec or mod_ruid2. If either one of these is already installed, then the issue is probably caused by something else. In that case, I would recommend opening a support ticket so our team can take a closer look.