diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-06-01 19:54:07 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-06-01 19:54:07 +0200 |
commit | 07e1e3a9454df55d27e3c52e6345a6a3aee1344a (patch) | |
tree | f6be7711317977bc483b9d1d2fdbe390bbd240f6 /lib/util.php | |
parent | e6b0eb3423ff0346fce64aadc1b33d481be7761f (diff) | |
download | nextcloud-server-07e1e3a9454df55d27e3c52e6345a6a3aee1344a.tar.gz nextcloud-server-07e1e3a9454df55d27e3c52e6345a6a3aee1344a.zip |
check if apps folder is writable
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 8 |
1 files changed, 8 insertions, 0 deletions
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); |