davetechfreak Posted February 7, 2011 Share Posted February 7, 2011 Hi guys, I am new here, and I am a bit stuck with doing something unusual. I want to create a script that can turn on a program (dynamips and dynagen). So far, I have tried 'exec' and 'shell_exec'. Soon I realized that apache runs the commands as 'www-data' user (apache2 in ubuntu) and it's very limited on what you can execute. Is there any way to do that at all? What would be the best practice? I am not concerned about security as this is not a production environment... Thanks Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted February 7, 2011 Share Posted February 7, 2011 Run the command with sudo. Setup the sudoers file to allow the web user to run specific commands without a password: http://linuxmanpages.com/man5/sudoers.5.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.