Change status code when config is write protected

Add hint msg, you can make config file read only

If the config.php is not writable, print an error message: #6893
 - set config writable
 - or set option to keep it read only

Signed-off-by: Eric Masseran <rico.masseran@gmail.com>
pull/9996/head
Eric Masseran 7 years ago committed by Morris Jobke
parent f148e3fb29
commit a34f70ce0a
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68

@ -249,14 +249,18 @@ class OC {
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";
echo "\n";
echo $l->t('See %s', [ $urlGenerator->linkToDocs('admin-dir_permissions') ])."\n";
echo "\n";
echo $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.')."\n";
echo $l->t('See %s', [ $urlGenerator->linkToDocs('admin-config') ])."\n";
exit;
} else {
OC_Template::printErrorPage(
$l->t('Cannot write into "config" directory!'),
$l->t('This can usually be fixed by giving the webserver write access to the config directory. See %s',
[ $urlGenerator->linkToDocs('admin-dir_permissions') ])
[ $urlGenerator->linkToDocs('admin-dir_permissions') ]) . '. '
. $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s',
[ $urlGenerator->linkToDocs('admin-config') ] )
);
}
}

@ -745,7 +745,9 @@ class OC_Util {
$errors[] = array(
'error' => $l->t('Cannot write into "config" directory'),
'hint' => $l->t('This can usually be fixed by giving the webserver write access to the config directory. See %s',
[$urlGenerator->linkToDocs('admin-dir_permissions')])
[ $urlGenerator->linkToDocs('admin-dir_permissions') ]) . '. '
. $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s',
[ $urlGenerator->linkToDocs('admin-config') ] )
);
}
}

Loading…
Cancel
Save