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

Inna

Member
Mar 10, 2018
24
6
3
Iran
cPanel Access Level
Root Administrator
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
Apr 26, 2020
320
121
118
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

Inna

Member
Mar 10, 2018
24
6
3
Iran
cPanel Access Level
Root Administrator
Thanks, but what other reasons may cause the issue?
Running lsattr for all the files shows all files have only "e" flag and it's fine I think.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,923
912
313
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