Merge pull request #21060 from owncloud/support-for-read-only-config-dir

Add support for read only config dir
This commit is contained in:
Thomas Müller 2015-12-09 14:32:00 +01:00
commit 04f4565fcd

View file

@ -642,13 +642,15 @@ class OC_Util {
}
// Check if config folder is writable.
if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
$errors[] = array(
'error' => $l->t('Cannot write into "config" directory'),
'hint' => $l->t('This can usually be fixed by '
. '%sgiving the webserver write access to the config directory%s.',
array('<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>'))
);
if(!OC_Helper::isReadOnlyConfigEnabled()) {
if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
$errors[] = array(
'error' => $l->t('Cannot write into "config" directory'),
'hint' => $l->t('This can usually be fixed by '
. '%sgiving the webserver write access to the config directory%s.',
array('<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>'))
);
}
}
// Check if there is a writable install folder.