[PerlChina] 又一问题:如何切换用户权限?

Steven Zhu stevenzyk at gmail.com
Tue Jun 10 00:28:39 PDT 2008


请教如何终止线程啊?
    @threadss[$tempcount]=threads->new(\&start_thread,$MySocket);
    @threads[tempcount]->detach();
提示Can't call "detach" method,我确认已经有这个package



在08-6-10,Mike. G <hylinux at gmail.com> 写道:
>
> suexec才是正解。
> 其他的我看都很麻烦。
> 自己patch一下apache的suexec部分,这个很容易的。
> 只要看一下关于路径的限制部分就可以了。
>
> 我原来patch过这部分。让虚拟主机的cgi(php,perl都运行在cgi模式)以各自用户的权限运行,就是不以apache用户,而是以各自的普通用户。
>
>
> 2008/6/6 shijialee <shijialee at gmail.com>:
>
>> gary.jsz wrote:
>> >
>> > 现在又来一个问题。
>> > 因为http的执行者是apache,那么,我怎么成切换高级用户的权限执行我要做的事
>> > 情呢?
>> >
>>
>> 用 sudo。 直接改 httpd 的用户成 root 不推荐。
>>
>>
>> >
>> > ------------------------------------------------------------------------
>>  >
>> > _______________________________________________
>> > China-pm mailing list
>> > China-pm at pm.org
>> > http://mail.pm.org/mailman/listinfo/china-pm
>>
>> _______________________________________________
>> China-pm mailing list
>> China-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/china-pm
>>
>
>
> _______________________________________________
> China-pm mailing list
> China-pm at pm.org
> http://mail.pm.org/mailman/listinfo/china-pm
>



-- 
BR
Steven.zhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/china-pm/attachments/20080610/e0664b32/attachment.html 


More information about the China-pm mailing list