nextcloud/server

`Cannot write into 'config' directory` misleading when an upgrade is needed

Open

#29,583 创建于 2021年11月6日

在 GitHub 查看
 (4 评论) (8 反应) (0 负责人)PHP (4,865 fork)batch import
1. to develop25-feedbackbugfeature: install and updategood first issue

仓库指标

Star
 (34,953 star)
PR 合并指标
 (平均合并 20天) (30 天内合并 627 个 PR)

描述

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Set up NextCloud with a read-only configuration file
  2. Set 'config_is_read_only' to true
  3. Upgrade NextCloud

Expected behaviour

The upgrade should be successful when no changes to the configuration file are necessary. Otherwise, there should be a message stating that the upgrade cannot be performed with a read-only configuration.

Actual behaviour

Currently, the message shown is

Cannot write into "config" directory! This can usually be fixed by giving the webserver write access to the config directory.
But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.

However, config_is_read_only is already set to true which makes the message rather confusing. The responsible line is this condition: https://github.com/nextcloud/server/blob/v22.2.0/lib/base.php#L248

Server configuration

Operating system: Debian Buster

Web server: nginx

Database: PostgreSQL

PHP version: 7.3

Nextcloud version: currently 20.0.13, but the issue is still present in newer versions

Updated from an older Nextcloud/ownCloud or fresh install: Updated

贡献者指南