且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

'DirData' parameter (./data) does not exist问题的解决

更新时间:2021-08-23 00:57:21

[root@localhost cgi-bin]#./awstats.pl -update -config=123 
Error: AWStats database directory defined in config file by 'DirData' parameter (./data) does not exist or is not writable. 
Check config file, permissions and AWStats documentation (in 'docs' directory).

这个问题应该是无法找到AWStats分析日志后写分析文件的目录导致的,我的情况是./data目录在cgi-bin目录下已经存在,并且权限也没有任何问题,可以读写,但是仍然提示错误,一时间内问题无法找到,最后发现了定义DirData变量的文件awstats.myConf.conf,在此文件中,指定了DirData的路径,默认是./data,为了安全其间,我直接写了data目录的绝对路径,然后继续执行更新操作,问题解决。
[root@localhost cgi-bin]#./awstats.pl -update -config=123
Update for config "./awstats.123.conf"
With data in log file "/cicro/cws3/vhosts/www.123.gov.cn/ROOT/log/accesslogs/123_access_log.txt"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 4663337)
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 4663337
 Found 4663337 already parsed records.
Parsed lines in file: 15023
 Found 1 dropped records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 15022 new qualified records.


























本文转自南非蚂蚁51CTO博客,原文链接:http://blog.51cto.com/ixdba/526098 ,如需转载请自行联系原作者