I have a simple php script that I want to have users run to execute deploys. I am getting a permission denied on the wsadmin.sh script. The script runs fine run as other users but when it's executed from the php script in the browser it fails.
echo exec('whoami');
exec ('sudo -i ./deploy-applications.sh localhost 8879 wasadmin Austin2012 /home/wasadmin/deployments'); ?>
I've tried removing the sudo -i and it fails the same.
Here's a snippet from the error_log:
./deploy-applications.sh: line 7: /opt/IBM/WebSphere/AppServer/bin/wsadmin.sh: Permission denied
sudo: unable to open audit system: Permission denied
Permissions on the file seem to be ok:
-rwxr-xr-x. 1 wasadmin wasadmin 3741 Dec 5 13:04 /opt/IBM/WebSphere/AppServer/bin/wsadmin.sh
The user that php executes as is apache
Does anyone have any ideas?