没有不值得去解决的问题,也没有不值得去学习的技术!

Error Updating Gutenberg: Upgrade Was Not Installed Because Some Files Could Not Be Copied

An error occurred while updating Gutenberg: the upgrade was not installed because we could not copy some files. This is usually due to inconsistent file permissions.

1. An error occurred while updating Gutenberg: the upgrade was not installed because we could not copy some files. This is usually due to inconsistent file permissions. See Figure 1.

An error occurred while updating Gutenberg: the upgrade was not installed because we could not copy some files. This is usually due to inconsistent file permissions.
Figure 1

2. Reference URL: https://www.shuijingwanwq.com/2021/02/19/4734/ . The cause is that the root user was also used to perform the update when updating Gutenberg previously.

3. After logging into the server, I checked /data/wwwroot/www.shuijingwanwq.com/wp-content/plugins/gutenberg and found that both the user and user group are root. See Figure 2.

After logging into the server, I checked /data/wwwroot/www.shuijingwanwq.com/wp-content/plugins/gutenberg and found that both the user and user group are root.
Figure 2
Plaintext

[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. Set the user and user group of the gutenberg directory to www. See Figure 3.

Set the user and user group of the gutenberg directory to www.
Figure 3
Plaintext

[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. Update Gutenberg again, and the update succeeds. See Figure 4.

Update Gutenberg again, and the update succeeds.
Figure 4

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系