I'm writing a script that backup some files using s3cmd amazon s3 command line utility.
When I run a s3cmd shell command from shell it backs up the file nicely. When I run the same command from PHP script (using backticks or shell_exec) it does not do anything and returns no output to the PHP script.
Other shell commands run successfully in similar way (backticks) such as mysqldump and tar. using whoami in the script and shell I found the shell user is root and PHP script user is 'apache'.
How can I make the PHP script run the command successfully? (I know the command should work because copying it as is to the shell does work).