I run Raspbian Wheezy on my Raspberry Pi, and i want to call a
Python script from
That all works great (i call '
exec python go.py' from php) but now i want to call a script which needs root rights.
I understood that running as root would help me out here ('
exec sudo python go2.py', so i added this line of code to my sudo file
%www-data ALL=(ALL) NOPASSWD: ALL
ok, and now it works again. But then i learned that it is not a good idea to grant the www-data group unlimited sudo rights. Then i found this question (How to grant sudo rights only to specific script files?), which showed me how to grant sudo rights to a single directory:
%www-data ALL=(ALL) NOPASSWD: /var/www/exec/
And then it all stops, because that doesn't work at my machine.
Can you tell me what i'm doing wrong?
i'm using lighttpd as my webserver.