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.
BEGIN {
$ENV{CATALYST_ENGINE} ||= 'HTTP';
$ENV{CATALYST_SCRIPT_GEN} = 4;
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' ?
'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.
BEGIN {
$ENV{CATALYST_ENGINE} ||= 'HTTP';
$ENV{CATALYST_SCRIPT_GEN} = 4;
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' ?