RE: [PHP] exec as another user
| From: | Jon Snell | Date: | Wed, 07 Mar 2001 23:44:50 +0000 |
| Subject: | RE: [PHP] exec as another user | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42969@lists.php.net to get a copy of this message | ||
It would be a much better idea to set the +s flag on the executable you are
trying to run, and make sure it's owned by the other user.
-----Original Message-----
From: Henrik Hansen [mailto:hh@mailserver.dk]
Sent: Wednesday, March 07, 2001 1:10 PM
To: php general
Subject: Re: [PHP] exec as another user
> Hi,
>
> This may be a stupid question but how can I execute programs as another
> user under php?
> I'm using Linux with Apache 1.3.12 and PHP 4.
The only way i can figure out would be by using the sudo command without a
password
(don't do that with root), do a 'man sudo' on your linux box
--
Henrik Hansen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net