Merge pull request #15922 from JostBaron/patch-1

Fix error message when wrong user on console
This commit is contained in:
Thomas Müller 2015-04-29 09:31:19 +02:00
commit fa6cb494ed
1 changed files with 2 additions and 2 deletions

View File

@ -47,9 +47,9 @@ try {
$user = posix_getpwuid(posix_getuid()); $user = posix_getpwuid(posix_getuid());
$configUser = posix_getpwuid(fileowner(OC::$SERVERROOT . '/config/config.php')); $configUser = posix_getpwuid(fileowner(OC::$SERVERROOT . '/config/config.php'));
if ($user['name'] !== $configUser['name']) { if ($user['name'] !== $configUser['name']) {
echo "Console has to be executed with the same user as the web server is operated" . PHP_EOL; 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; echo "Current user: " . $user['name'] . PHP_EOL;
echo "Web server user: " . $configUser['name'] . PHP_EOL; echo "Owner of config.php: " . $configUser['name'] . PHP_EOL;
exit(0); exit(0);
} }
} }