WordPress Update - This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

Inna

Well-Known Member
Mar 10, 2018
50
8
58
Iran
cPanel Access Level
Root Administrator
Twitter
Hi, I have some WordPress websites server with root access, and at the time of creating the server, everything was fine and WordPress itself and plugins and themes were updating without any issues, but I'm not sure why recently I got an error indicates usually permission error (at least I see permissions are fine).

Error when updating WordPress:

This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php
These are what I did to investigate the problem:

Code:
ls -ld /home
drwx--x--x 26 root root 4096 Mar 9 20:03 home
ls -ld /home/my_user
drwx--x--x 26 my_user my_user 4096 Mar 9 20:03 /home/my_user/
ls -ld /home/my_user/public_html
drwxr-x--- 26 my_user nobody 4096 Mar 9 20:03 /home/my_user/public_html/
Also all of the files inside public_html permissions are 0644, and all directories are 0755.
Code:
cd /home/my_user/public_html/
find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;
find . -type f -exec chown my_user:my_user {} \; && find . -type d -exec chown my_user:my_user {} \;
So till now, there's nothing wrong with permissions and ownership in my opinion.

Checking wp-admin, wp-admin/includes and wp-admin/includes/update-core.php permissions and ownership was fine and had no problem, but I'm not sure why WordPress cannot install any plugin, theme or itself.

I use CloudLinux OS, and my_user website uses altphp-73 (I also used ea-73 and ea-74 but it did not make difference), php-handler suphp (I also ran it with cgi and lsapi), easy-apache with below configurations:
Code:
MPM: mod_mpm_prefork
Apache modules (some of them):
mod_cgi
mod_lsapi
mod_mpm_prefork
mod_suexec
mod_suphp
Would you please help me what is causing the issue and how may I solve it?
Thanks in advance
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
576
266
138
IN
cPanel Access Level
Root Administrator
Please share the output of the below command

Code:
# lsattr /home/my_user/public_html/wp-admin/includes/update-core.php
 
  • Like
Reactions: Inna

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
576
266
138
IN
cPanel Access Level
Root Administrator
The below article may help you.

If the above article does not help then you can reach out to one of the Certified System Administrators to help you with this issue.
 
  • Like
Reactions: Inna and cPRex

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,651
2,636
363
cPanel Access Level
Root Administrator
I also agree the -e flag is fine in this situation.

There's any number of things that could cause this issue, but these problems wouldn't be related to the cPanel software itself. Since you have root access to the server you're welcome to submit a ticket to our team so we can check things directly, but we may still need to refer you to an administrator to get this issue resolved.
 
  • Like
Reactions: kodeslogic

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
576
266
138
IN
cPanel Access Level
Root Administrator
@Inna
If you want you can reach out to us on Skype - live:kodeslogic we'll be happy to help.
 
  • Like
Reactions: cPRex