Re: PHP System command - need help
| From: | Chris Moyer | Date: | Tue, 30 May 2000 22:53:29 +0000 |
| Subject: | Re: PHP System command - need help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-675@lists.php.net to get a copy of this message | ||
On Tue, May 30, 2000 at 03:49:38PM -0500, Travis Kriza wrote:
> Hello. I'm trying to issue a system command via a php3 web page t
>hat runs a script. Unfortunately, the script seems to bomb out
>( it triggers a secure copy and fails to create a SSH directory ).
>I'm trying to find out what user it is executing this as and
First, the script will be run as the same user as the webserver,
in most cases this will be 'nobody'.
>remedy it so the script will operate properly. The script functions
>fine as run through my machines cron, so if there is a way to execute
>a command from a php page as root, I'd appreciate knowing how to
> do that as well. Any help is appreciated.
Hmm, having the webserver able to run things as root, would be a
gigantic security problem. I'm not sure, never tried this, but you
might be able to setuid the script as an appropriate user to make it
work properly.
-- Chris Moyer -- cmoyer@chekinc.com --
PHP Developer -- Chek.com