Re: Changing users in php script
| From: | Nitin | Date: | Fri, 03 Oct 2003 07:08:54 +0000 |
| Subject: | Re: Changing users in php script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164866@lists.php.net to get a copy of this message | ||
You can use 'sudoers' for the purpose, that way you'll be able to give just
that permission to the user of your choice. then you can connect as that
user through 'exec' or 'system' and can execute that comand.
For more information check out:
http://www.courtesan.com/sudo/intro.html
Enjoy
Nitin
----- Original Message -----
From: "esctoday.com | Wouter van Vliet" <wouter@esctoday.com>
To: "'John Nichel'" <jnichel@by-tor.com>;
<php-general@lists.php.net>
Sent: Friday, October 03, 2003 4:58 AM
Subject: RE: [PHP] Changing users in php script
> I don't have much experience in it myself but I've seen it working ..
Where
> you should be looking is not really PHP but more the Apache "suexec"
> wrapper/module. You can then specify a user and group in your VirtualHost
> section.
>
> Wouter
>
> -----Original Message-----
> From: John Nichel [mailto:jnichel@by-tor.com]
> Sent: Thursday, October 02, 2003 3:09 AM
> To: php-general@lists.php.net
> Subject: [PHP] Changing users in php script
>
> I know php runs under the same user/group as the webserver for web based
> applications, but is there a way to change to another user? All the
> recent talk about exec got me thinking that I could set something up to
> automatically create user mailboxes under qmail + vmailmgr. I normall
> do this via the command line by running 'vadduser' while I'm su'ed to
> the owner of the virtual host. So basically, to do this via php, I
> would need to su to the owner of the vhost inside of the script, run the
> command, and exit out of the su. Can this be done?
>
> --
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com
>
> --
> 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
>