[Catalyst-dev] run as another system user

chunzi chunzi at perlchina.org
Sat Jul 16 12:53:38 CEST 2005

I am writing a webmail using Catalyst, and wanner it runging as
'vpopmail' user, so it can
read or write some mail files under the Maildirs.

Here is my script, is that right? at least it will print 'vpopmail' when
call system whoami in the script.

use User::pwent;
use User::grent;
$pw = getpwnam('vpopmail');
$< = $> = $pw->uid();
$( = $) = $pw->gid();

could catalyst support somthing like 'perl myapp_server.pl -u vpopmail'
to let it run as user 'vpopmail' ?

More information about the Catalyst-dev mailing list