diff options
author | Sam Bull <aa6bs0@sambull.org> | 2021-06-22 19:25:14 +0100 |
---|---|---|
committer | skjnldsv <skjnldsv@protonmail.com> | 2024-02-28 14:20:30 +0100 |
commit | ae3b9cce996b631c5768842565b028b59156d347 (patch) | |
tree | 6d2fe6d4319d35faaa77fe546aa4f1b17cf8bb4f /cron.php | |
parent | 455a209b9c4f3b95a016ce1c0bcd1bcfa3fc86bf (diff) | |
download | nextcloud-server-ae3b9cce996b631c5768842565b028b59156d347.tar.gz nextcloud-server-ae3b9cce996b631c5768842565b028b59156d347.zip |
feat: check `datadirectory` owner instead of `config.php` owner
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'cron.php')
-rw-r--r-- | cron.php | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -115,11 +115,11 @@ try { } $user = posix_getuid(); - $configUser = fileowner(OC::$configDir . 'config.php'); - if ($user !== $configUser) { - echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL; + $dataDirectoryUser = fileowner($config->getSystemValueString('datadirectory', \OC::$SERVERROOT . '/data')); + if ($user !== $dataDirectoryUser) { + echo "Console has to be executed with the user that owns the data directory" . PHP_EOL; echo "Current user id: " . $user . PHP_EOL; - echo "Owner id of config.php: " . $configUser . PHP_EOL; + echo "Owner id of the data directory: " . $dataDirectoryUser . PHP_EOL; exit(1); } |