summaryrefslogtreecommitdiff
path: root/app/check_setup.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-13 15:47:48 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-13 15:47:48 -0400
commit0b7435b8827081341a331ecdd5546ac25121d87d (patch)
treee439735e077ceb0b4f77266b1f3e9fcd337e55e8 /app/check_setup.php
parent41610150238a67471d79caa5bcb2ace1dd4578d1 (diff)
API: new procedure 'removeAllFiles' and contract change for 'createFile'
Diffstat (limited to 'app/check_setup.php')
-rw-r--r--app/check_setup.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/check_setup.php b/app/check_setup.php
index 065b8e10..624b6b34 100644
--- a/app/check_setup.php
+++ b/app/check_setup.php
@@ -38,3 +38,15 @@ if (! is_writable('data')) {
if (ini_get('arg_separator.output') === '&amp;') {
ini_set('arg_separator.output', '&');
}
+
+// Prepare folder for uploaded files
+if (! is_dir(FILES_DIR)) {
+ if (! mkdir(FILES_DIR, 0755, true)) {
+ die('Unable to create the upload directory: "'.FILES_DIR.'"');
+ }
+}
+
+// Check permissions for files folder
+if (! is_writable(FILES_DIR)) {
+ die('The directory "'.FILES_DIR.'" must be writeable by your webserver user');
+}