From 1148f0eee5f7346b60fc8780d6ade30586f2cbf8 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 23 Jan 2016 13:58:10 -0500 Subject: Check permissions of the data folder when using Sqlite --- app/check_setup.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/check_setup.php') diff --git a/app/check_setup.php b/app/check_setup.php index d6fbd4dd..eec63ed8 100644 --- a/app/check_setup.php +++ b/app/check_setup.php @@ -19,6 +19,11 @@ if (version_compare(PHP_VERSION, '5.4.0', '<')) { } } +// Check data folder if sqlite +if (DB_DRIVER === 'sqlite' && ! is_writable('data')) { + throw new Exception('The directory "data" must be writeable by your web server user'); +} + // Check PDO extensions if (DB_DRIVER === 'sqlite' && ! extension_loaded('pdo_sqlite')) { throw new Exception('PHP extension required: "pdo_sqlite"'); -- cgit v1.2.3