Skip to content
Snippets Groups Projects
Commit 12b751dd authored by Philippe Le Brouster's avatar Philippe Le Brouster Committed by Morris Jobke
Browse files

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.
parent c86e742e
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ try { ...@@ -54,7 +54,7 @@ try {
exit(0); exit(0);
} }
$user = posix_getpwuid(posix_getuid()); $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']) { if ($user['name'] !== $configUser['name']) {
echo "Console has to be executed with the user that owns the file config/config.php" . 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment