From: Frank Karlitschek Date: Fri, 1 Jun 2012 17:54:07 +0000 (+0200) Subject: check if apps folder is writable X-Git-Tag: v4.5.0beta1~74^2~425^2~6^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=07e1e3a9454df55d27e3c52e6345a6a3aee1344a;p=nextcloud-server.git check if apps folder is writable --- diff --git a/lib/util.php b/lib/util.php index be7fc00da8f..628c23f4cba 100644 --- a/lib/util.php +++ b/lib/util.php @@ -28,6 +28,14 @@ class OC_Util { exit; } + // Check if apps folder is writable. + if(!is_writable(OC::$SERVERROOT."/apps/")) { + $tmpl = new OC_Template( '', 'error', 'guest' ); + $tmpl->assign('errors',array(1=>array('error'=>"Can't write into apps directory 'apps'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud"))); + $tmpl->printPage(); + exit; + } + // Create root dir. if(!is_dir($CONFIG_DATADIRECTORY_ROOT)){ $success=@mkdir($CONFIG_DATADIRECTORY_ROOT);