PHP-CLI, expect, dump and sudo problem
I am trying to write a web based backup control mechanism for my operators. I am having good success except with the 'dump' command itself. I am using 'expect' to control the responses to 'dump' and I am using PHP-CLI to fork the dump command so an auto refresh web page will display the progress.
The problem is that I need to run the command as 'apache' which of course controls the web pages. I put the Apache user in the 'sudoers' file so it can run the command. So far all is normal. I can run everything from the command line as root so I know all the scripts are working. Where I am having the problem is when the Apache user launches the expect script. The 'dump' command starts fine and gets to Pass I. After running that pass briefly (it may be trying to start pass II but never puts that message out) it simply terminates. I have searched every log I could find but there are no error messages anywhere. Does anyone have any ideas why this might be happening or at least where or what I can do to get some kind of reason for the termination? Thanks.
|