Fix the config.php owner check for console.php

The config directory must be taken from OC::$configDir

Minor fix

 - Remove uneeded slash in the configdir path.
This commit is contained in:
Philippe Le Brouster 2015-06-13 21:05:57 +02:00 committed by Morris Jobke
parent c86e742e67
commit 12b751ddc9
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ try {
exit(0);
}
$user = posix_getpwuid(posix_getuid());
$configUser = posix_getpwuid(fileowner(OC::$SERVERROOT . '/config/config.php'));
$configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php'));
if ($user['name'] !== $configUser['name']) {
echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL;
echo "Current user: " . $user['name'] . PHP_EOL;