Hi all, My server is spitting up this error for the last little while. trying to figure out how to fix: Code: Cron <www-data@server1> [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh Error while processing /etc/awstats/awstats.conf Create/Update database for config "/etc/awstats/awstats.conf" by AWStats version 7.2 (build 1.992) From data in log file "/var/log/apache2/access.log"... Error: Couldn't open server log file "/var/log/apache2/access.log" : Permission denied Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong. Regards
Well yeah ... your apache access log probably is not owned by www-data so it can't read the log. Which is good if you run other processes as www-data and don't want to leak data - specially if you run mod_php or alike. On the other hand bad if you want to run some cron as www-data to read those files. Are you on Debian 8 by any chance? Check your /var/log/apache2 - folder ( use ls -Alah or alike ) should give something like -rw-r----- 1 root adm 22K Mar 7 19:45 access.log You could add a user belonging to adm group and it would be able to read those files. You also could change the way the logs are created and open up permissions which... I wouldn't advise.
Thanks for your response, I am going to take your advise and not change it. I never use awstats anyways. I am on Ubuntu LTS14.04 LAMP Is there a way to safely remove awstats? Regards
You can call awstats on your own and specify different config files as param. Just comment out the lines in /etc/cron.d/awstats or delete that file. Software removal should be done by issueing "apt-get --purge remove awstats" which should remove your awstats configs and software. There might be a leftover /var/lib/awstats folder though, you can delete it afterwards aswell.
Awesome, Thanks!!!!!!!!!!! Can I use the same command to remove webalizer too? I never use that either
Sure, if you don't need webalizer for anything you should be able to remove it the same way. apt-get --purge remove completly removes anything you like ( or don't like ).
Great, This is a private owncloud server for myself and my family, so I have no need for stuff like this on it. Regards
i am having a tuff time with awstats from the beginning of my server setup. this is not going to stop ispconfig from not function and hence not a big issue. however, i am getting lot of mails to root. here is what the mail says and this is just one website. i have this repeated for many websites. Code: Error while processing /etc/awstats/awstats.xxxxxxxxxx.com.conf Create/Update database for config "/etc/awstats/awstats.xxxxxxxxxx.com..conf" by AWStats version 7.6 (build 20161204) >From data in log file "/var/log/ispconfig/httpd/xxxxxxxxxx.com/yesterday-access.log"... Error: Couldn't open server log file "/var/log/ispconfig/httpd/xxxxxxxxxx.com/yesterday-access.log" : No such file or directory Setup ('/etc/awstats/awstats.xxxxxxxxxx.com.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory). Error while processing /etc/awstats/awstats.conf Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats. Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory). can you tell me how to rectify this. i am using debian stretch perfect server setup word by word without any customization. thanks.
I use ISPConfig and those stats have worked. Just to make sure do these things: https://www.howtoforge.com/community/threads/please-read-before-posting.58408/ Have you looked at the files the mail complains can not be opened? Do they exist, what are owner and permissions?
the file is present with root as the owner and permissions as below Code: $ pwd $ /var/log/ispconfig/httpd/xxxxxxxx.com $ ls -la $ lrwxrwxrwx 1 root root 54 May 1 2019 yesterday-access.log -> /var/www/clients/client0/web26/log/20190430-access.log i have attached the htf_report.txt as required. thanks in advance for your help.
dear till, here it is Code: total 208 drwxr-xr-x 2 root root 4096 Nov 1 06:08 . drwxr-xr-x 11 root root 4096 Jul 1 2018 .. -rw-r--r-- 1 root root 183 Oct 3 00:02 20191001-access.log.gz -rw-r--r-- 1 root root 208 Oct 5 00:03 20191003-access.log.gz -rw-r--r-- 1 root root 184 Oct 7 00:03 20191005-access.log.gz -rw-r--r-- 1 root root 340 Oct 8 00:04 20191006-access.log.gz -rw-r--r-- 1 root root 213 Oct 9 00:03 20191007-access.log.gz -rw-r--r-- 1 root root 276 Oct 11 00:04 20191009-access.log.gz -rw-r--r-- 1 root root 188 Oct 12 00:04 20191010-access.log.gz -rw-r--r-- 1 root root 203 Oct 14 00:04 20191012-access.log.gz -rw-r--r-- 1 root root 209 Oct 20 00:04 20191018-access.log.gz -rw-r--r-- 1 root root 223 Oct 21 00:04 20191019-access.log.gz -rw-r--r-- 1 root root 245 Oct 22 00:04 20191020-access.log.gz -rw-r--r-- 1 root root 188 Oct 23 00:03 20191021-access.log.gz -rw-r--r-- 1 root root 223 Oct 24 00:04 20191022-access.log.gz -rw-r--r-- 1 root root 660 Oct 25 00:03 20191023-access.log.gz -rw-r--r-- 1 root root 191 Oct 26 00:04 20191024-access.log.gz -rw-r--r-- 1 root root 189 Oct 28 00:04 20191026-access.log.gz -rw-r--r-- 1 root root 342 Oct 31 00:04 20191029-access.log.gz -rw-r--r-- 1 root root 269 Nov 1 00:04 20191030-access.log.gz -rw-r--r-- 1 root root 168 Oct 31 06:51 20191031-access.log -rw-r--r-- 1 root root 323 Nov 1 06:08 20191101-access.log lrwxrwxrwx 1 root root 19 Nov 1 06:08 access.log -> 20191101-access.log -rw-r--r-- 1 root root 0 Nov 1 00:04 error.log -rw-r--r-- 1 root root 30 Oct 23 00:03 error.log.10.gz -rw-r--r-- 1 root root 30 Oct 22 00:04 error.log.11.gz -rw-r--r-- 1 root root 30 Oct 21 00:04 error.log.12.gz -rw-r--r-- 1 root root 30 Oct 20 00:04 error.log.13.gz -rw-r--r-- 1 root root 30 Oct 19 00:04 error.log.14.gz -rw-r--r-- 1 root root 30 Oct 18 00:04 error.log.15.gz -rw-r--r-- 1 root root 30 Oct 17 00:03 error.log.16.gz -rw-r--r-- 1 root root 30 Oct 16 00:04 error.log.17.gz -rw-r--r-- 1 root root 30 Oct 15 00:04 error.log.18.gz -rw-r--r-- 1 root root 30 Oct 14 00:04 error.log.19.gz -rw-r--r-- 1 root root 30 Nov 1 00:04 error.log.1.gz -rw-r--r-- 1 root root 30 Oct 13 00:08 error.log.20.gz -rw-r--r-- 1 root root 30 Oct 12 00:04 error.log.21.gz -rw-r--r-- 1 root root 30 Oct 11 00:04 error.log.22.gz -rw-r--r-- 1 root root 30 Oct 10 00:03 error.log.23.gz -rw-r--r-- 1 root root 30 Oct 9 00:03 error.log.24.gz -rw-r--r-- 1 root root 30 Oct 8 00:04 error.log.25.gz -rw-r--r-- 1 root root 30 Oct 7 00:03 error.log.26.gz -rw-r--r-- 1 root root 30 Oct 6 00:03 error.log.27.gz -rw-r--r-- 1 root root 30 Oct 5 00:03 error.log.28.gz -rw-r--r-- 1 root root 30 Oct 4 00:03 error.log.29.gz -rw-r--r-- 1 root root 30 Oct 31 00:04 error.log.2.gz -rw-r--r-- 1 root root 30 Oct 3 00:02 error.log.30.gz -rw-r--r-- 1 root root 30 Oct 30 00:04 error.log.3.gz -rw-r--r-- 1 root root 30 Oct 29 00:04 error.log.4.gz -rw-r--r-- 1 root root 30 Oct 28 00:04 error.log.5.gz -rw-r--r-- 1 root root 30 Oct 27 00:04 error.log.6.gz -rw-r--r-- 1 root root 30 Oct 26 00:04 error.log.7.gz -rw-r--r-- 1 root root 30 Oct 25 00:03 error.log.8.gz -rw-r--r-- 1 root root 30 Oct 24 00:04 error.log.9.gz lrwxrwxrwx 1 root root 54 May 1 2019 yesterday-access.log -> /var/www/clients/client0/web26/log/20190430-access.log
Please delete the yesterday-access.log symlink and then check tomorrow if a new symlink has been created shortly after midnight which points to the right log file (the one from yesterday which should translate tomorrow to 20191101-access.log)
hi till, sorry the problem persists. i have root mails regularly approx about 125 mail in 24 hours. the yesterday_log link file i deleted midnight yesterday and today i had about 4/5 yesterday_log link files only. i deleted them too. can you please advise how to go about this again.