免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9322 | 回复: 5
打印 上一主题 下一主题

急openwebmail setuid root出错,perl怎样才能支持SUIDPERL [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-03-29 11:12 |只看该作者 |倒序浏览
Openwebmail setuid root 出错
Version:Freebsd 5.3 release!

方法:新的 perl5.8(5.8.1 以後版本) port 內定會將 setuid support 關掉
所以在 make port 時要執行 'make -DENABLE_SUIDPERL' 才可以

否則做出來的 speedy_suid 即使 mode=4555, owner=root, 一樣無法 setuid root。

我已经安装了perl5.8.6,应该怎样做"make -DENABLE_SUIDPERL"这个步骤。在Ports的那个目录,帮忙列出具体方法。谢谢!!!

论坛徽章:
0
2 [报告]
发表于 2005-03-29 11:41 |只看该作者

急openwebmail setuid root出错,perl怎样才能支持SUIDPERL

系统自带的perl 就可以速度很快的使用 Openwebmail收发邮件,在OpenBSD中更为简单

/usr/ports/mail/openwebmail/ make & make install后就可以使用了。


想快点,可以/www/cgi-bin/openwebmail/preload.pl -q --all

或者使用单进程的 thttpd代替httpd

论坛徽章:
0
3 [报告]
发表于 2005-03-29 11:46 |只看该作者

急openwebmail setuid root出错,perl怎样才能支持SUIDPERL

楼上兄台,谢谢啦。。。我找到了解决办法,如下:希望对大家有帮助,因为我Ports默认安装是不行的。

新版的 perl 好像「谁都不认识」
因此,如果原本的系统跑得好好的,却突然啥事都不对劲,大概就是和 perl 的升级有关。
其实,只要使用 portupgrade 就可解决此一问题。
portupgrade -f "perl-5.8.*" -m "ENABLE_SUIDPERL=yes" -r "perl-5.8.*"
说明:
-f "perl-5.8.*"
强迫更新,就算版本号码相同,也会将 perl 重新编译一次。
-m "ENABLE_SUIDPERL=yes"
在 make 时送出 ENABLE_SUIDPERL=yes 的参数,这个参数值在配合 openwebmail 使用时特别需要,否则 openwebmail 会 error
ps. 此部份的参数与值,建议写入 pkgtools.conf 中。若是,则可省略此参数。
-r "perl-5.8.*"
把相依于 perl-5.8 的软件一起更新
到底有多少软件相依于 perl 呢?天知道,我一点概念也没有,就让 portupgrade 帮我做吧!

论坛徽章:
0
4 [报告]
发表于 2005-04-01 00:03 |只看该作者

急openwebmail setuid root出错,perl怎样才能支持SUIDPERL

楼住的经验分享不错,谢了。

论坛徽章:
0
5 [报告]
发表于 2005-07-12 17:18 |只看该作者

急openwebmail setuid root出错,perl怎样才能支持SUIDPERL

访问: http://localhost/cgi-bin/openwebmail/openwebmail.pl
系统提示:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

分析一:
看日志tail -f /var/log/httpd/error_log错误提示如下:
[Tue Jul 12 15:56:56 2005] [error] [client 127.0.0.1] Premature end of script headers: openwebmail.pl
[Tue Jul 12 15:56:56 2005] [error] [client 127.0.0.1] (2)!!!!!!!!!!!!!!!!!!: exec of '/var/www/cgi-bin/openwebmail/openwebmail.pl' failed
好象是执行/var/www/cgi-bin/openwebmail/openwebmail.pl失败,所以手工执行此文件:
[root@localhost www]# /var/www/cgi-bin/openwebmail/openwebmail.pl
bash: /var/www/cgi-bin/openwebmail/openwebmail.pl: /usr/bin/suidperl: bad interpreter: 没有那个文件或目录
现在问题明朗了,是/var/www/cgi-bin/openwebmail/openwebmail.pl调用/usr/bin/suidperl这个文件失败,因为系统根本没有/usr/bin/suidperl这个文件。解决的办法很简单修改/var/www/cgi-bin/openwebmail/所有openwebmail*.pl文件中“#!/usr/bin/suidperl -T”为“#!/usr/bin/perl”(后来发现openwebmail带的文档中提到suidperl的问题,可以重新编译perl来实现suidperl我没有实验,只是根据文档里面猜测的)
访问: http://localhost/cgi-bin/openwebmail/openwebmail.pl
系统提示与以前相同,日志提示改变:
[Tue Jul 12 16:28:06 2005] [error] [client 127.0.0.1] Premature end of script headers: openwebmail.pl
[Tue Jul 12 16:28:06 2005] [error] [client 127.0.0.1] Can't do setuid

分析二:
重新认真读openwebmail带的文档发现如下如下解决方法:
perl /var/www/cgi-bin/openwebmail/misc/tools/wrapsuid/wrapsuid.pl /var/www/cgi-bin/openwebmail/
访问: http://localhost/cgi-bin/openwebmail/openwebmail.pl
系统提示:
Software error:
Can't locate Text/Iconv.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 . /var/www/cgi-bin/openwebmail) at shares/iconv.pl line 7.
BEGIN failed--compilation aborted at shares/iconv.pl line 7.
For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

分析三:
阅读文档得到如下答案:
iconv是用来支持多国的字集转换功能,但可能在编辑时有错
cp /var/www/cgi-bin/openwebmail/misc/patches/iconv.pl.fake /var/www/cgi-bin/openwebmail/shares/iconv.pl
访问: http://localhost/cgi-bin/openwebmail/openwebmail.pl
系统提示:
Please execute '/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init' on server first!

分析四:
提示什么就做什么,在命令行下执行
/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
提示如下
[root@localhost openwebmail]# /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
Please change '/var/www/cgi-bin/openwebmail/etc/dbm.conf' from
dbm_ext                 .db
dbmopen_ext             none
dbmopen_haslock         no
to
dbm_ext                 .db
dbmopen_ext             .db
dbmopen_haslock         no
And execute '/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init' again!
ps: If you are running openwebmail in persistent mode,
    don't forget to 'touch openwebmail*.pl', so speedycgi
    will reload all scripts, modules and conf files in --init

分析五:
去修改/var/www/cgi-bin/openwebmail/etc/dbm.conf这个文件发现没有这个文件。没有就新建,内容为:
dbm_ext                 .db
dbmopen_ext             .db
dbmopen_haslock         no
然后再执行一次/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
访问: http://localhost/cgi-bin/openwebmail/openwebmail.pl
系统提示:
'/var/www/cgi-bin/openwebmail/.openwebmail.pl' must setuid to root

分析六:
原来刚才执行perl /var/www/cgi-bin/openwebmail/misc/tools/wrapsuid/wrapsuid.pl /var/www/cgi-bin/openwebmail/后,所有openwebmail*.pl文件的s位没有了。所以
chmod 4755 /var/www/cgi-bin/openwebmail/openwebmail*.pl
访问: http://localhost/cgi-bin/openwebmail/openwebmail.pl
OK,可以看到登陆框了,说明openwebmail已经安装成功了,下面就是来结合sendmail了。

论坛徽章:
0
6 [报告]
发表于 2007-05-15 11:50 |只看该作者

使用openwebmail在IE中出现***setuid of root的错误提示的解决办法!

我的openwebmail在初次安装成功后可以进入登录界面正常运行,但隔了一日再进入登录界面时出现如上的错误提示,在网上遍查资料解决种种,其中看到有一个:将suidperl文件chomd 4555,其他的方法觉得太复杂,一试果然爽,久违的界面终于出现。通过这一经历也提醒我,不要把问题想得太复杂!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP