From: Bart Visscher Date: Tue, 5 Jun 2012 15:51:41 +0000 (+0200) Subject: Make check for writable apps dir configurable X-Git-Tag: v4.5.0beta1~74^2~424^2~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9d936976a9c89f183ad7258ac04e047d27900b5e;p=nextcloud-server.git Make check for writable apps dir configurable --- diff --git a/config/config.sample.php b/config/config.sample.php index e86dc05cb01..7ab327e2bce 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -29,6 +29,11 @@ $CONFIG = array( "log_type" => "", "logfile" => "", "loglevel" => "", +/* Set this to false to disable the check for writable apps dir. + * If the apps dir is not writable, you can't download&install extra apps + * in the admin apps menu. + */ +"writable_appsdir" => true, // "datadirectory" => "" ); ?> diff --git a/lib/util.php b/lib/util.php index 9a1fb7ac370..7a9545e3659 100644 --- a/lib/util.php +++ b/lib/util.php @@ -31,7 +31,7 @@ class OC_Util { } // Check if apps folder is writable. - if(!is_writable(OC::$SERVERROOT."/apps/")) { + if(OC_Config::getValue('writable_appsdir', true) && !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();