admin管理员组文章数量:1295863
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:
Downloading update from .7.zip…
The authenticity of wordpress-5.7.zip could not be verified as no signature was found.
Unpacking the update…
The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php
Installation failed.
These are what I did to investigate the problem:
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.
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 {} \;
The result of lsattr
is as below:
lsattr /home/my_user/public_html/wp-admin/includes/update-core.php
-------------e-- /home/my_user/public_html/wp-admin/includes/update-core.php
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.
PHP-Handler is suphp
(I also ran it with cgi
and lsapi
) but nothing changed in this regard.
Apache configuration is as below:
MPM: mod_mpm_prefork
Apache modules (some of them):
mod_cgi
mod_lsapi
mod_mpm_prefork
mod_suexec
mod_suphp
I should mention that I have created a file like info.php
and executed in the web browser, it's fine. Then I chown
ed to like root:root
and in the second case I get 403 error (that's expected), then I reverted it again to my_user:my_user
Apache group is nobody
I think, and public_html
directory's chown
is my_user:nobody
. So my website and other websites work fine, but the only issue is when updating or even trying to install a plugin/theme/new update.
I've checked the log files but nothing were logged.
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:
Downloading update from https://downloads.wordpress/release/fa_IR/wordpress-5.7.zip…
The authenticity of wordpress-5.7.zip could not be verified as no signature was found.
Unpacking the update…
The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php
Installation failed.
These are what I did to investigate the problem:
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.
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 {} \;
The result of lsattr
is as below:
lsattr /home/my_user/public_html/wp-admin/includes/update-core.php
-------------e-- /home/my_user/public_html/wp-admin/includes/update-core.php
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.
PHP-Handler is suphp
(I also ran it with cgi
and lsapi
) but nothing changed in this regard.
Apache configuration is as below:
MPM: mod_mpm_prefork
Apache modules (some of them):
mod_cgi
mod_lsapi
mod_mpm_prefork
mod_suexec
mod_suphp
I should mention that I have created a file like info.php
and executed in the web browser, it's fine. Then I chown
ed to like root:root
and in the second case I get 403 error (that's expected), then I reverted it again to my_user:my_user
Apache group is nobody
I think, and public_html
directory's chown
is my_user:nobody
. So my website and other websites work fine, but the only issue is when updating or even trying to install a plugin/theme/new update.
I've checked the log files but nothing were logged.
Share Improve this question edited Mar 18, 2021 at 20:51 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Mar 18, 2021 at 15:32 SaeedSaeed 1091 gold badge1 silver badge5 bronze badges 4 |1 Answer
Reset to default 8I solved this by making the webserver user the owner and the group of all the files in the WordPress directory.
I figured out the webserver user was daemon with:
ps aux | egrep '(apache|httpd)'
Then I changed the permissions with:
sudo chown -R daemon:daemon /your-path-to-wordpress
版权声明:本文标题:linux - WordPress Update - This is usually due to inconsistent file permissions.: wp-adminincludesupdate-core.php 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741610221a2388214.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
my_user
or is it something likewww-data
orapache
orhttpd
? If it's notmy_user
then that'd be why WordPress can't replace the files. – Pat J Commented Mar 18, 2021 at 21:38my_user
when I runtop
and seelsphp
's user – Saeed Commented Mar 19, 2021 at 8:06