Skip to content

Commit

Permalink
Update occ
Browse files Browse the repository at this point in the history
make it possible to run as root

Signed-off-by: Frank Karlitschek <karlitschek@users.noreply.github.com>
  • Loading branch information
karlitschek authored and AndyScherzinger committed Mar 22, 2024
1 parent 4121b84 commit ab8c6f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion occ
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@
* See the COPYING-README file.
*/

//$argv = $_SERVER['argv'];
// make it possible to run as root
if (posix_getuid() == 0){
$command = implode (' ', $argv);
echo(shell_exec('sudo -u www-data '.$command));
exit;
}

require_once __DIR__ . '/console.php';

0 comments on commit ab8c6f1

Please sign in to comment.