1、在更新Gutenberg时发生了错误:因为我们不能复制一些文件,升级未被安装。这通常是因为存在不一致的文件权限。如图1
2、参考网址:https://www.shuijingwanwq.com/2021/02/19/4734/ 。原因在于之前更新Gutenberg时,也使用了 root 用户进行操作更新所导致。
3、登录服务器,查看 /data/wwwroot/www.shuijingwanwq.com/wp-content/plugins/gutenberg 的用户与用户组皆为 root。如图2
[root@iZ23wv7v5ggZ wp-admin]# cd /data/wwwroot/www.shuijingwanwq.com/wp-content/plugins [root@iZ23wv7v5ggZ plugins]# ls -l total 68 drwxr-xr-x 4 www www 4096 Mar 8 10:03 akismet drwxr-xr-x 10 www www 4096 Mar 9 09:44 backupwordpress drwxr-xr-x 3 www www 4096 Aug 13 2020 classic-editor drwxr-xr-x 7 www www 4096 Mar 1 15:31 contact-form-7 drwxr-xr-x 2 www www 4096 Dec 5 2019 disable-google-fonts drwxr-xr-x 2 www www 4096 Dec 5 2019 golang-brush-for-syntaxhighlighter-evolved drwxr-xr-x 6 root root 4096 Apr 1 21:11 gutenberg drwxr-xr-x 2 www www 4096 Dec 5 2019 hello-dolly drwxr-xr-x 6 www www 4096 Feb 19 11:30 hueman-addons -rw-r--r-- 1 www www 30 Apr 16 2009 index.php drwxr-xr-x 4 www www 4096 Apr 9 2020 kill-429 drwxr-xr-x 6 www www 4096 Dec 5 2019 light drwxr-xr-x 5 www www 4096 Mar 31 10:44 nimble-builder drwxr-xr-x 6 www www 4096 Mar 9 09:44 regenerate-thumbnails drwxr-xr-x 6 www www 4096 Mar 11 10:27 syntaxhighlighter drwxr-xr-x 2 www www 4096 Dec 5 2019 wp-cumulus drwxr-xr-x 3 www www 4096 Feb 24 10:06 wp-pagenavi
4、设置目录 gutenberg 的用户与用户组为 www。如图3
[root@iZ23wv7v5ggZ plugins]# chown -R www:www gutenberg [root@iZ23wv7v5ggZ plugins]# ls -l total 68 drwxr-xr-x 4 www www 4096 Mar 8 10:03 akismet drwxr-xr-x 10 www www 4096 Mar 9 09:44 backupwordpress drwxr-xr-x 3 www www 4096 Aug 13 2020 classic-editor drwxr-xr-x 7 www www 4096 Mar 1 15:31 contact-form-7 drwxr-xr-x 2 www www 4096 Dec 5 2019 disable-google-fonts drwxr-xr-x 2 www www 4096 Dec 5 2019 golang-brush-for-syntaxhighlighter-evolved drwxr-xr-x 6 www www 4096 Apr 1 21:11 gutenberg drwxr-xr-x 2 www www 4096 Dec 5 2019 hello-dolly drwxr-xr-x 6 www www 4096 Feb 19 11:30 hueman-addons -rw-r--r-- 1 www www 30 Apr 16 2009 index.php drwxr-xr-x 4 www www 4096 Apr 9 2020 kill-429 drwxr-xr-x 6 www www 4096 Dec 5 2019 light drwxr-xr-x 5 www www 4096 Mar 31 10:44 nimble-builder drwxr-xr-x 6 www www 4096 Mar 9 09:44 regenerate-thumbnails drwxr-xr-x 6 www www 4096 Mar 11 10:27 syntaxhighlighter drwxr-xr-x 2 www www 4096 Dec 5 2019 wp-cumulus drwxr-xr-x 3 www www 4096 Feb 24 10:06 wp-pagenavi [root@iZ23wv7v5ggZ plugins]#
5、再次更新Gutenberg,成功更新。如图4
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/250829.html