Ok from the beginning PHP executes and writes files with
permissions (like userid and groupid) Webserver is running.
So what i think will be the best way for you to do. Is to create an
executable with the same owner. and then execute it. As for
/usr/local/bin directory it allows to write in it only to root or
superuser. I recommend you to create a user like foo
then in his home directory create a subdirectory like web and chmod it
to 777. and use it as an output for the script. Got an idea?
Also you always can use /tmp directory :)
Apache runs as 'nobody' and 'nogroup', so therefore PHP runs as the same.
(Security, don't you know.) :) I cannot change file owner or group through
PHP. The executable (getlist.sh) is created with the same owner/group. I do
change the file permissions to '755' to allow the file to be an executable.
Try hand writing a script then exec() it from php.
Tried that, no go.
crud, I knew this was gonna' happen because of the very tight deadline I am
on. I had a feeling that this is why the original exec(curl) didn't work.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php