/ docker-compose 安装的 nextcloud 更新方法

Created Tue, 20 Aug 2024 05:05:19 +0800
181 Words

今天打开nextcloud,页面提示:需要更新 请使用命令行更新程序,因为通过浏览器更新在您的config.php中被禁用。

执行 docker exec -u 33 -it nextcloud-app-1 php occ upgrade 一般来讲都会报错,因为你的容器uid不是33,会输出类似下列提示:

Console has to be executed with the user that owns the file config/config.php
Current user id: 33
Owner id of config.php: 82
Try adding 'sudo -u #82' to the beginning of the command (without the single quotes)

改成 docker exec -u 82 -it nextcloud-app-1 php occ upgrade 即可,继续执行,输出如下图所示

Image description

现在就可以继续打开网站了。