summaryrefslogtreecommitdiff
path: root/app/check_setup.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-23 13:58:10 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-23 13:58:10 -0500
commit1148f0eee5f7346b60fc8780d6ade30586f2cbf8 (patch)
tree193becdfe5bc5c41b6ab1ed116c7c7f58890001b /app/check_setup.php
parent8baa417ecef452ad033cb43b555835e0c3d7397a (diff)
Check permissions of the data folder when using Sqlite
Diffstat (limited to 'app/check_setup.php')
-rw-r--r--app/check_setup.php5
1 files changed, 5 insertions, 0 deletions
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"');