- 論壇徽章:
- 0
|
我寫了一個(gè)CGI程序,主要是執(zhí)行一個(gè)iptables的外部指令,但發(fā)現(xiàn)失敗了,有辦法么?
#!/usr/bin/perl
use CGI;
$co = new CGI;
print
$co->header,
$co->start_html('start');
@proglist = ("/sbin/iptables", "-A -p icmp -j ACCEPT");
print $co->b(exec(@proglist));
print $co->end_html;
但執(zhí)行出現(xiàn)失敗,apache的log提示:
[Tue Sep 02 17:19:23 2008] [error] [client ] iptables v1.4.0:
[Tue Sep 02 17:19:23 2008] [error] [client ] can't initialize iptables table `filter': Permission denied
[Tue Sep 02 17:19:23 2008] [error] [client ] |
|