aboutsummaryrefslogtreecommitdiffstats
path: root/mod/setup.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-08 18:20:47 -0800
committerfriendica <info@friendica.com>2014-01-08 18:20:47 -0800
commit352e4dc21b77410ffbf01cca499b86709b4be43e (patch)
tree50ebe42d770f8a0eb67fdd3d3e7eb85ba2f4f602 /mod/setup.php
parent6eda8064449d154614345e9bd867dce2faba0deb (diff)
downloadvolse-hubzilla-352e4dc21b77410ffbf01cca499b86709b4be43e.tar.gz
volse-hubzilla-352e4dc21b77410ffbf01cca499b86709b4be43e.tar.bz2
volse-hubzilla-352e4dc21b77410ffbf01cca499b86709b4be43e.zip
add store directory write check to install checks
Diffstat (limited to 'mod/setup.php')
-rwxr-xr-xmod/setup.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/mod/setup.php b/mod/setup.php
index 245508683..ca5566578 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -228,6 +228,8 @@ function setup_content(&$a) {
check_smarty3($checks);
+ check_store($checks);
+
check_keys($checks);
if(x($_POST,'phpath'))
@@ -515,6 +517,24 @@ function check_smarty3(&$checks) {
}
+function check_store(&$checks) {
+ $status = true;
+ $help = "";
+
+ @mkdir('store',STORAGE_DEFAULT_PERMISSIONS);
+
+ if( !is_writable('store') ) {
+
+ $status=false;
+ $help = t('Red uses the store directory to save uploaded files. The web server needs to have write access to the store directory under the Red top level folder') . EOL;
+ $help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL;
+ }
+
+ check_add($checks, t('store is writable'), $status, true, $help);
+
+}
+
+
function check_htaccess(&$checks) {
$a = get_app();
$status = true;