summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-08-30 21:43:25 +0200
committerGitHub <noreply@github.com>2018-08-30 21:43:25 +0200
commit1ddde36e93943045f73d7645aafc5c6f8118dd8b (patch)
treea87620d0ca2cba8a23dab86e0834fa4824fe5f8d
parent8ea2f8dea434d78c6c98f583806c96418885ad25 (diff)
parenta6bb19fa11fb132f91eeb692057a0bd5b7e94948 (diff)
downloadnextcloud-server-1ddde36e93943045f73d7645aafc5c6f8118dd8b.tar.gz
nextcloud-server-1ddde36e93943045f73d7645aafc5c6f8118dd8b.zip
Merge pull request #10939 from nextcloud/bugfix/10930/perm-checker-wrong-path
Fix path when app has wrong permission
-rw-r--r--settings/Controller/CheckSetupController.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php
index 747e60c7cb2..9169808456f 100644
--- a/settings/Controller/CheckSetupController.php
+++ b/settings/Controller/CheckSetupController.php
@@ -544,18 +544,17 @@ Raw output
*/
protected function getAppDirsWithDifferentOwner(): array {
$currentUser = posix_getpwuid(posix_getuid());
- $appDirsWithDifferentOwner = [];
+ $appDirsWithDifferentOwner = [[]];
foreach (OC::$APPSROOTS as $appRoot) {
if ($appRoot['writable'] === true) {
- $appDirsWithDifferentOwner = array_merge(
- $appDirsWithDifferentOwner,
- $this->getAppDirsWithDifferentOwnerForAppRoot($currentUser, $appRoot)
- );
+ $appDirsWithDifferentOwner[] = $this->getAppDirsWithDifferentOwnerForAppRoot($currentUser, $appRoot);
}
}
+ $appDirsWithDifferentOwner = array_merge(...$appDirsWithDifferentOwner);
sort($appDirsWithDifferentOwner);
+
return $appDirsWithDifferentOwner;
}
@@ -576,7 +575,7 @@ Raw output
$absAppPath = $appsPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename();
$appDirUser = posix_getpwuid(fileowner($absAppPath));
if ($appDirUser !== $currentUser) {
- $appDirsWithDifferentOwner[] = $absAppPath . DIRECTORY_SEPARATOR . $fileInfo->getFilename();
+ $appDirsWithDifferentOwner[] = $absAppPath;
}
}
}