Answers for "php shell_exec with root"

PHP
0

php shell_exec with root

# add sudoers for www data to execute without pass
sudo vi /etc/sudoers
www-data ALL=(ALL) NOPASSWD: ALL

# execute with sudo 
shell_exec('python3 script.py')
Posted by: Guest on August-27-2021

Browse Popular Code Answers by Language