hey guy how can i sudo execute a python3 script with PHP? i tried:
exec("sudo -E python3 /var/www/html/send.py " . $_POST['username'] . " " . $_POST['msg']);
that should execute this:
sudo -E python3 /var/www/html/send.py TheUsername TheMessageIinputed
if i executed this comand in the terminal it works but here it doesnt work...
I also put this into sudoers script:
www-data ALL=(ALL) NOPASSWD: ALL
but still doesnt work...
; some nasty command script? use the correct escaping!