summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-09-16 22:49:03 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-09-16 22:49:03 +0200
commita3718ca0366346db43af3f3214ad8da9e3bd7df4 (patch)
treebbf39b5e3ac32a51ac1a0de03b52eeae5e90eb98 /lib
parent4356f8daeb7b269e8e931abe12675cc89c237c9c (diff)
downloadnextcloud-server-a3718ca0366346db43af3f3214ad8da9e3bd7df4.tar.gz
nextcloud-server-a3718ca0366346db43af3f3214ad8da9e3bd7df4.zip
i just learned that we also have to check if directories are readable. it seams that is_readable also checks for 'x' right.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/util.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php
index b66d5426a6e..5e39fd1f914 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -211,13 +211,13 @@ class OC_Util {
$permissionsHint="Permissions can usually be fixed by giving the webserver write access to the ownCloud directory";
// Check if config folder is writable.
- if(!is_writable(OC::$SERVERROOT."/config/")) {
+ if(!is_writable(OC::$SERVERROOT."/config/") or !is_readable(OC::$SERVERROOT."/config/")) {
$errors[]=array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud");
}
// Check if there is a writable install folder.
if(OC_Config::getValue('appstoreenabled', true)) {
- if( OC_App::getInstallPath() === null || !is_writable(OC_App::getInstallPath())) {
+ if( OC_App::getInstallPath() === null || !is_writable(OC_App::getInstallPath()) || !is_readable(OC_App::getInstallPath()) ) {
$errors[]=array('error'=>"Can't write into apps directory",'hint'=>"You can usually fix this by giving the webserver user write access to the apps directory
in owncloud or disabling the appstore in the config file.");
}
@@ -257,7 +257,7 @@ class OC_Util {
if(!$success) {
$errors[]=array('error'=>"Can't create data directory (".$CONFIG_DATADIRECTORY.")",'hint'=>"You can usually fix this by giving the webserver write access to the ownCloud directory '".OC::$SERVERROOT."' (in a terminal, use the command 'chown -R www-data:www-data /path/to/your/owncloud/install/data' ");
}
- } else if(!is_writable($CONFIG_DATADIRECTORY)) {
+ } else if(!is_writable($CONFIG_DATADIRECTORY) or !is_readable($CONFIG_DATADIRECTORY)) {
$errors[]=array('error'=>'Data directory ('.$CONFIG_DATADIRECTORY.') not writable by ownCloud<br/>','hint'=>$permissionsHint);
}