Skip to content

Instantly share code, notes, and snippets.

@eymeen
Created September 12, 2024 12:29
Show Gist options
  • Select an option

  • Save eymeen/2667802781d5d06fd077c0b7c19fb9e4 to your computer and use it in GitHub Desktop.

Select an option

Save eymeen/2667802781d5d06fd077c0b7c19fb9e4 to your computer and use it in GitHub Desktop.
How to give root permissoin to a PHP project on aaPanel
  1. go to app store -> search for php
  2. open configs of the PHP version you are using
  3. stop the FPM service (PHPManager > service > Stop)
  4. go to FPM Profile
  5. match these lines
listen.owner = root
listen.group = root
user = root
group = root
  1. open the terminal and run
> php-fpm --allow-to-run-as-root

now you can check

echo exec('whoami');

remove exec() from disabled functions if it didn't run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment