Don't write to config file if config_is_read_only is set

Also don't write to cache in this case to prevent cache and config file
being out of sync.

Fixes: #29901
Signed-off-by: Jonas Meurer <jonas@freesources.org>
This commit is contained in:
Jonas Meurer
2021-12-06 12:40:57 +01:00
parent e8ce7a3e5f
commit 241dfef7fb
3 changed files with 33 additions and 5 deletions

View File

@@ -809,11 +809,11 @@ $CONFIG = [
/**
* In certain environments it is desired to have a read-only configuration file.
* When this switch is set to ``true`` Nextcloud will not verify whether the
* configuration is writable. However, it will not be possible to configure
* all options via the Web interface. Furthermore, when updating Nextcloud
* it is required to make the configuration file writable again for the update
* process.
* When this switch is set to ``true``, writing to the config file will be
* forbidden. Therefore, it will not be possible to configure all options via
* the Web interface. Furthermore, when updating Nextcloud it is required to
* make the configuration file writable again and to set this switch to ``false``
* for the update process.
*
* Defaults to ``false``
*/