Giving php root access to run linux cli application
My server is of Ubuntu build, with Nginx & PHP5-FPM
I tried to do the following
$shell_cmd = "someprogram 'runthispath'";
shell_exec($shell_cmd);
When I tried to do so, it just won't work, because my php5-fpm is run as user "nginx" and I guess it does not have power to run someprogram.
My server is only use by me, and its for some developing of app, security is not a big concern as of now. What should I do to enable my php to run application, I read that I could do so with editing sudoer file, but I want to run the app without using "sudo" or if sudo is the only choice, I will just do it , hope to hear some advise.
Thanks!