Skip to content
Snippets Groups Projects
Commit 47ddd179 authored by Jost Baron's avatar Jost Baron
Browse files

Fix error message when wrong user on console

Owncloud complains if the user runs a shell script with a user other than the user that owns `config/config.php`. The error message does not reflect this, and instead speaks about the web server user. Related issue: #15920 .
parent 132ce04f
No related branches found
No related tags found
No related merge requests found
...@@ -47,9 +47,9 @@ try { ...@@ -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);
} }
} }
......
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