]> source.dussan.org Git - nextcloud-server.git/commitdiff
check if apps folder is writable
authorFrank Karlitschek <frank@owncloud.org>
Fri, 1 Jun 2012 17:54:07 +0000 (19:54 +0200)
committerFrank Karlitschek <frank@owncloud.org>
Fri, 1 Jun 2012 17:54:07 +0000 (19:54 +0200)
lib/util.php

index be7fc00da8f0c632cabff9cfd9237ccff51ad807..628c23f4cba5e8b4949a144064d37f898b10eda4 100644 (file)
@@ -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);