aboutsummaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-08-17 17:18:17 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-08-17 17:18:17 +0200
commitf25e2d82a56276457e26b7102220a7e403333718 (patch)
tree55d05c31a93fad6f54e1d5f3e4ae1fbb1f9666dc /cron.php
parent3a99ef30dfa6a49ef0c5f4c0515a98e55c43dbe4 (diff)
downloadnextcloud-server-f25e2d82a56276457e26b7102220a7e403333718.tar.gz
nextcloud-server-f25e2d82a56276457e26b7102220a7e403333718.zip
Make the warning about wrong permissions more clear.
It's basically the same as for console.php now. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/cron.php b/cron.php
index cdfa0fb367d..e5afaba8d2a 100644
--- a/cron.php
+++ b/cron.php
@@ -92,12 +92,13 @@ try {
echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
exit(1);
}
+
$user = posix_getpwuid(posix_getuid());
$configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php'));
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 "Web server user: " . $configUser['name'] . PHP_EOL;
+ echo "Owner of config.php: " . $configUser['name'] . PHP_EOL;
exit(1);
}