Permissions should be really really fixed now

This commit is contained in:
Roman Hergenreder 2020-04-02 22:02:44 +02:00
parent 52c85408af
commit f0ebb295be

@ -132,10 +132,19 @@ namespace Documents\Install {
$configDir = "core/Configuration/"; $configDir = "core/Configuration/";
if(!is_writeable($configDir)) { if(!is_writeable($configDir)) {
$failedRequirements[] = "<b>$configDir</b> is not writeable. Try running <b>chmod 755</b>"; $failedRequirements[] = "<b>$configDir</b> is not writeable. Try running <b>chmod 700 $configDir</b>";
$success = false; $success = false;
} }
if (function_exists("posix_getuid")) {
$userId = posix_getuid();
if(fileowner($configDir) !== posix_getuid()) {
$username = posix_getpwuid($userId)['name'];
$failedRequirements[] = "<b>$configDir</b> is not owned by current user: $username ($userId). Try running <b>chown -R $username $configDir</b>";
$success = false;
}
}
if(version_compare(PHP_VERSION, '7.1', '<')) { if(version_compare(PHP_VERSION, '7.1', '<')) {
$failedRequirements[] = "PHP Version <b>>= 7.1</b> is required. Got: <b>" . PHP_VERSION . "</b>"; $failedRequirements[] = "PHP Version <b>>= 7.1</b> is required. Got: <b>" . PHP_VERSION . "</b>";
$success = false; $success = false;