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

Steven Zhu stevenzyk at gmail.com
Tue Jun 10 18:15:50 PDT 2008


现在detach可以起作用了,但是似乎无法终止线程啊
我尝试的例子是把一个正在做copy的线程终止掉,停止copy,但是现在发觉仍然在做啊


在08-6-10,joe jiang <lamp.purl at gmail.com> 写道:
>
> 没准弄错了 $ 和 @ ?
> the and those, they are different.
>
> On 二, 2008-06-10 at 15:28 +0800, Steven Zhu wrote:
> > 请教如何终止线程啊?
> >     @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
> > _______________________________________________
> > 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/20080611/d8aa084b/attachment.html 


More information about the China-pm mailing list