From 4c4269c1fa03b8ebe0250666de959b2400ea5efc Mon Sep 17 00:00:00 2001 From: Maurice Meyer Date: Fri, 21 Jul 2017 17:48:53 +0200 Subject: [PATCH] Fix #34, now showing an error message --- api/install.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/install.php b/api/install.php index 795b3a5..25626f3 100644 --- a/api/install.php +++ b/api/install.php @@ -18,6 +18,13 @@ if(file_exists("../config/config-user.php")) { echo "Permission denied!"; exit(); } + +if(!(is_writable("../config"))) { + $retval['status'] = "error"; + $retval['message'] = "Can't write to the config directory, please check the file system permissions"; + die(json_encode($retval)); +} + //Get input $input = json_decode(file_get_contents('php://input')); //Database command