admin管理员组文章数量:1306740
I've attempted to set up my WordPress installation as recommended in the Codex's "Hardening WordPress" article. That is:
- All files are 644, all folders are 755
- Everything is owned by the user account
wp-content
is writeable by the webserver account (it's 775 and group-owned by apache's account)
The Codex document says auto-update should work with this setup. But in practice, when I try to update (from 4.2 to 4.31), I get the usual permission error (inconsistent permissions on update-core.php
).
If I temporarily change that file to be writeable by the webserver account, then the update gets past that step (and complains about permissions for a massive list of other files).
So as near as I can tell, it seems that auto-update can't proceed unless most of the files in wp-includes
and wp-admin
are writeable by the webserver process - which is exactly what the "hardening" article says to avoid.
Any guesses what the issue might be?
I've attempted to set up my WordPress installation as recommended in the Codex's "Hardening WordPress" article. That is:
- All files are 644, all folders are 755
- Everything is owned by the user account
wp-content
is writeable by the webserver account (it's 775 and group-owned by apache's account)
The Codex document says auto-update should work with this setup. But in practice, when I try to update (from 4.2 to 4.31), I get the usual permission error (inconsistent permissions on update-core.php
).
If I temporarily change that file to be writeable by the webserver account, then the update gets past that step (and complains about permissions for a massive list of other files).
So as near as I can tell, it seems that auto-update can't proceed unless most of the files in wp-includes
and wp-admin
are writeable by the webserver process - which is exactly what the "hardening" article says to avoid.
Any guesses what the issue might be?
Share Improve this question edited Jan 25, 2021 at 7:25 Celso Bessa 1,1288 silver badges18 bronze badges asked Nov 5, 2015 at 6:15 fenomasfenomas 1335 bronze badges1 Answer
Reset to default 4The point of hardening is to avoid the core files to be manipulated by external users (on shared hosting) and by the webserver (as it is the main source of exploits). Since the update runs via the webserver it is obvious that if you hardened your files against webserver initiated manipulation, the update will fail.
Most people probably get around it by using FTP to place the updated files (the update process imports a file from the update server and then uses the FTP protocol to actually write it instead of using the PHP file APIs). If you don't have FTP on your server then you are out of luck.
Secure settings are just not very friendly to updates, but IMO the cost of doing manual update (If you have SSH access then just use WP-CLI) once a month (if your plugins/theme are that bad) is worth the enhanced security.
本文标签: Autoupdate failing with quothardenedquot permissions
版权声明:本文标题:Auto-update failing with "hardened" permissions 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741807392a2398587.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论