diff options
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php index cd5d8feb1f6..74b668551ab 100644 --- a/lib/base.php +++ b/lib/base.php @@ -188,9 +188,9 @@ class OC { public static function checkConfig() { $l = \OC::$server->getL10N('lib'); - if (file_exists(self::$configDir . "/config.php") - and !is_writable(self::$configDir . "/config.php") - ) { + $configFileWritable = file_exists(self::$configDir . "/config.php") && is_writable(self::$configDir . "/config.php"); + if (!$configFileWritable && !OC_Helper::isReadOnlyConfigEnabled() + || !$configFileWritable && \OCP\Util::needUpgrade()) { if (self::$CLI) { echo $l->t('Cannot write into "config" directory!')."\n"; echo $l->t('This can usually be fixed by giving the webserver write access to the config directory')."\n"; |