I've tried a couple of Python forums with this question, but the more I think about it, the more I think has something to do with the apache environment.
I'm basically trying to have a php page pass one string variable and execute a command on the server using that variable. I found php system() and exec() and am using system(). The command is executed. So far so good. Inside the script (which is python) I use expect to become root, and execute several commands. Here's the glitch. If I run the python script from the command line, as 'www' (the user my apache runs as) it becomes root as it should and executes the commands sucessfully. But, If I have a php script execute the exact same python script, expect does not accept the password, and the commands fail.
I've come to realize that there is something in the apache environment that is not allowing 'www' to become root. Any ideas on what is going on, or even ideas on how to debug?? I'm at a loss. Thanks in advance.
Apache, Php, Python and Expect
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users