I need to invoke sudo from a PHP script (web-triggered) so as to run a command as another user.
However, I get the message "sudo: sorry, you must have a tty to run sudo".
Would there be any security problem on giving the user
nobody a tty??
Would you recommend a different approach to do what I need (run a shell script as a different user)?