summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-06-21 10:36:37 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-06-21 11:25:38 +0200
commit191a6c65d9caecea5db540c898468e631e7b2444 (patch)
treefeca0f068f3b4334a18fb0442600dd10c53eb517 /lib
parentb4df57f3f02f65ed71d1072280751170379a53e8 (diff)
downloadnextcloud-server-191a6c65d9caecea5db540c898468e631e7b2444.tar.gz
nextcloud-server-191a6c65d9caecea5db540c898468e631e7b2444.zip
Show error message if config file is not readable
* when the config file is not writable there is a error message shown * same happens now if the config file is not readable * fixes #180
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Config.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Config.php b/lib/private/Config.php
index 3cff3ca960d..4b7497decd9 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -184,10 +184,10 @@ class Config {
// Include file and merge config
foreach ($configFiles as $file) {
- $filePointer = file_exists($file) ? fopen($file, 'r') : false;
+ $fileExistsAndIsReadable = file_exists($file) && is_readable($file);
+ $filePointer = $fileExistsAndIsReadable ? fopen($file, 'r') : false;
if($file === $this->configFilePath &&
- $filePointer === false &&
- @!file_exists($this->configFilePath)) {
+ $filePointer === false) {
// Opening the main config might not be possible, e.g. if the wrong
// permissions are set (likely on a new installation)
continue;