Re: cURL in an exec() . more
| From: | Scott Fletcher | Date: | Wed, 03 Jul 2002 15:03:59 +0000 |
| Subject: | Re: cURL in an exec() . more | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105215@lists.php.net to get a copy of this message | ||
Ah! I know what you're feeling about Linux. I had that problem using PHP
and text editing software (for programming) with Caldera, like ftp timeout,
security, file path, etc. It become too much for me, so I junked it and
went back to AIX. I haven't tried it on Red Hat but I can easily turned off
hte ftp timeout, etc. from there. Haven't tried PHP stuffs on Red Hat.
FletchSOD
"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:002701c222a0$c958ffc0$8102a8c0@niigziuo4ohhdt...
> 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
>
>