install.php: better permission error reporting

This commit is contained in:
Zankaria 2024-09-11 17:56:57 +02:00 committed by Zankaria
parent 87899a0988
commit 945e14d404

View file

@ -3,9 +3,14 @@
// Installation/upgrade file
define('VERSION', '5.1.3');
if (!is_writable('inc/instance-config.php') || !is_writable('inc/')) {
print('install.php does not have permission to write to /inc/, without permission the installer cannot continue');
exit();
if (!is_writable('inc/instance-config.php')) {
if (file_exists('inc/instance-config.php')) {
print('install.php does not have permission to write to /inc/instance-config.php, without permission the installer cannot continue');
exit();
} else if (!is_writable('inc/')) {
print('install.php does not have permission to write to /inc/, without permission the installer cannot continue');
exit();
}
}
require 'inc/bootstrap.php';