Skip to content

Config setting config_is_read_only should prevent Nextcloud from writing to config.php #29901

Closed

Description

@mejo-

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.

Description

The config setting config_is_read_only currently only prevents Nextcloud from checking for writable config in server health checks.

That's also how the setting is described at https://github.com/nextcloud/documentation/blob/6efc785734a23786bff4c6340a03fa2acbf12f42/admin_manual/configuration_server/config_sample_php_parameters.rst#nextcloud-verifications.

Still, users/admins expect the setting to prevent Nextcloud from writing to config.php. That would be helpful, e.g. to prevent admin users from accidently changing server configuration.

Steps to reproduce

  1. Set 'config_is_read_only' => true in config.php
  2. Make changes to Nextcloud config via admin interface or occ
  3. Nextcloud writes to config.php

Activity

  1. added
    1. to developAccepted and waiting to be taken care of
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Nov 25, 2021
  2. self-assigned this
    on Nov 25, 2021
  3. added 3 commits that reference this issue on Dec 7, 2021
    be7479a
    45e2af4
    33bd721
  4. added and removed
    1. to developAccepted and waiting to be taken care of
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Dec 7, 2021
  5. added 2 commits that reference this issue on Dec 7, 2021
    25b3ecf
    241dfef
  6. Dreamsorcerer commented on Mar 6, 2024

    @Dreamsorcerer
    Contributor

    The solution to this (but, not the problem description) directly contradicts the goals of #11075.
    Before, it was possible to get through an upgrade by manually making changes to the config file, now it aborts immediately even when there are no changes to be made to the config file.

    Old behaviour:
    Nextcloud would call set('theme', '') etc. Because the existing config has the same values, it would not attempt to write anything to the config file. If the config file would get changed, then it gives an error if the read-only option is set.

    New behaviour:
    The same call is made and immediately errors despite the fact that the config file will not be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions