Check out setuid and sticky bits for the file permissions. Remember that if you are running php under apache and you try the exec with a command php is running with apaches permissions. So apache needs to be able to run what ever you are trying to run with the exec command.
B i g D o g ----- Original Message ----- From: "Jay Blanchard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 03, 2002 8:49 AM Subject: RE: [PHP] cURL in an exec() . more > OK, here is where I am (between handling other pre-holiday/long weekend > processese here); > > I have the PHP script create a shell script containing the needed code for > the cURL process. Of course the shell script will execute from the command > line with me as 'root'. But the exec() that calls the shell script will not > execute the script because of improper permissions. (Has to do with the > permissions on the topmost directory for where the file lives, changing that > could be dangerous from a security standpoint). > > So I have tried to change those (I am on a Linux box) via the PHP, no luck. > It will let me chmod the shell script via the PHP script. So I tried to move > the script to /usr/local/bin; > > rename("getlist.sh", "/usr/local/bin/getlist.sh"); Permission denied > exec("mv getlist.sh /usr/local/bin/getlist.sh"); Permissiion denied > exec("cp getlist.sh /usr/local/bin/getlist.sh"); Permissiion denied > > I am looking into posix_setuid() to change the permissions for the time > needed, but I've a feeling, after a couple of tests, that this is not going > to be the way to do this either. > > I wish permissions in Linux were more straigtforward. Anyone have an idea > how to do this with opening the server wide? Thanks for all your help. > > Jay > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php