From 79ad82f58bb98c7e95583ff8152322b433bab537 Mon Sep 17 00:00:00 2001 From: StefanKelm Date: Thu, 21 Nov 2019 10:31:06 +0100 Subject: [PATCH] Update AdminShell.php Adding "wwwrun" as a user since it is common under SUSE Linux --- app/Console/Command/AdminShell.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Command/AdminShell.php b/app/Console/Command/AdminShell.php index 9c42c6850..18aa58b7c 100644 --- a/app/Console/Command/AdminShell.php +++ b/app/Console/Command/AdminShell.php @@ -315,13 +315,13 @@ class AdminShell extends AppShell public function runUpdates() { $whoami = exec('whoami'); - if ($whoami === 'httpd' || $whoami === 'www-data' || $whoami === 'apache') { + if ($whoami === 'httpd' || $whoami === 'www-data' || $whoami === 'apache' || $whoami === 'wwwrun') { echo 'Executing all updates to bring the database up to date with the current version.' . PHP_EOL; $processId = $this->args[0]; $this->Server->runUpdates(true, false, $processId); echo 'All updates completed.' . PHP_EOL; } else { - die('This OS user is not allowed to run this command.'. PHP_EOL. 'Run it under `www-data` or `httpd`.' . PHP_EOL . 'You tried to run this command as: ' . $whoami . PHP_EOL); + die('This OS user is not allowed to run this command.'. PHP_EOL. 'Run it under `www-data` or `httpd` or `apache` or `wwwrun`.' . PHP_EOL . 'You tried to run this command as: ' . $whoami . PHP_EOL); } }