Is it possible to run shell_exec on a file owned by root:wheel if the user executing it is admin?
I have a very simple script. It restarts a service;
#!/bin/sh
if [ "$1" = "" ]
then
BASE="/mypath/myservice";
else
BASE=$1;
fi
export BASE
echo Stopping service $BASE
pidfile=$BASE/pid
kill `cat $pidfile` <-- fails here with permission denied
If i call this script using shell_exec from my php script it get the following results
Stopping service /mypath/myservice
rm: /myservice/mypath/pid: Permission denied
pid is owned by root:wheel as in Freebsd ownerships
The script is running as admin. What can i do? I have tried everything without results.
Help!