AWStats错误:pipe道命令失败

当通过pipe道读取一个icecast日志来过滤掉一个虚拟主机时,我从AWStats 7.2 cron作业(在Ubuntu 14.04上,使用了stock awstats软件包)得到这个错误:

Error while processing /etc/awstats/awstats.mysite.conf Create/Update database for config "/etc/awstats/awstats.mysite.conf" by AWStats version 7.2 (build 1.992) From data in log file "grep '\/mysite' < /var/log/icecast2/access.log |"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Error: Command for pipe 'grep '\/mysite' < /var/log/icecast2/access.log |' failed Setup ('/etc/awstats/awstats.mysite.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory). 

在表面上,这看起来像是一个简单的权限问题,但是configuration文件和日志文件都可以被运行的www-data用户读取。 如果我shell进入该用户帐户,我可以读取这两个文件没有问题。

 #sudo -u www-data ls -al /etc/awstats/awstats.mysite.conf /var/log/icecast2/access.log -rw-r--r-- 1 www-data www-data 444 May 13 11:23 /etc/awstats/awstats.mysite.conf -rw-r--r-- 1 icecast2 icecast 0 Jun 8 05:29 /var/log/icecast2/access.log 

如果我在同一个用户下运行grep命令,那也可以。

为了避免虚假的问题,我已经禁用了所有的插件 – 我只是使用geoip,所以设置是非常香草的。 如果我用完整的--debug=6输出手动运行awstats命令,它看起来没有任何读取文件的麻烦 – 文件closures时会抛出错误。 碰巧,这个日志文件目前是空的,所以没有什么可以分析,但肯定不应该产生权限错误?

 Sat Jun 13 20:33:21 2015 - DEBUG 1 - Start Update process (lastprocesseddate=201505) Sat Jun 13 20:33:21 2015 - DEBUG 1 - Open log file "grep '\/mysite' < /var/log/icecast2/access.log |" Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Sat Jun 13 20:33:21 2015 - DEBUG 1 - _host_p:0 _host_h:0 _host_k:0 _host_l:0 _host_s:0 _host_u:0 Sat Jun 13 20:33:21 2015 - DEBUG 1 - _url_p:0 _url_k:0 _url_e:0 _url_x:0 Sat Jun 13 20:33:21 2015 - DEBUG 1 - _waithost_e:0 _waithost_l:0 _waithost_s:0 _waithost_u:0 Sat Jun 13 20:33:21 2015 - DEBUG 1 - End of processing log file (AWStats memory cache is TmpDNSLookup=0 TmpBrowser=0 TmpOS=0 T mpRefererServer=0 TmpRobot=0) ....(lots of stuff that seems related to successful processing and output deleted) Sat Jun 13 20:33:21 2015 - DEBUG 1 - Update offset of section sider_404=10022 in file at offset 1381 Sat Jun 13 20:33:21 2015 - DEBUG 1 - Update MonthVisits=290 in file at offset 2140 Sat Jun 13 20:33:21 2015 - DEBUG 1 - Update MonthUnique=168 in file at offset 2173 Sat Jun 13 20:33:21 2015 - DEBUG 1 - Update MonthHostsKnown=0 in file at offset 2210 Sat Jun 13 20:33:21 2015 - DEBUG 1 - Update MonthHostsUnknown=182 in file at offset 2249 Sat Jun 13 20:33:21 2015 - DEBUG 1 - Call to Init_HashArray Sat Jun 13 20:33:21 2015 - DEBUG 1 - Close log file "grep '\/mysite' < /var/log/icecast2/access.log |" Sat Jun 13 20:33:21 2015 - DEBUG 1 - Command for pipe 'grep '\/mysite' < /var/log/icecast2/access.log |' failed 

我错过了什么?