Root user mail flood with messages from Cron Daemon


I am running 2 virtualmin servers, a Debian 7 and an Ubuntu 12.04. Virtualmin and Webmin are pretty stock, no big changes. Both have a problem where the root user gets every an email every 5 minutes.

The mail is sent from root@hostname Cron Deamon.
The contents are:

Error while processing /etc/awstats/awstats.DOMAIN.TLD.conf
Create/Update database for config “/etc/awstats/awstats.DOMAIN.TLD.conf” by
AWStats version 7.0 (build 1.971)
From data in log file “/var/log/virtualmin/DOMAIN.TLD_access_log”…
Phase 1 : First bypass old records, searching new record…
Direct access after last parsed record (after line 9363)
Error: Couldn’t open file “/home/DOMAIN/awstats/awstats112013.DOMAIN.TLD.tmp.16397”
for write: Permission denied
Setup (’/etc/awstats/awstats.DOMAIN.TLD.conf’ file, web server or permissions)
may be wrong.
Check config file, permissions and AWStats documentation (in ‘docs’ directory).

This repeats for all domains… I replaced the original domainname with DOMAIN.TLD in this example.

AWstats seem to work properly.

Can I stop the flooding?
And more important: What is wrong?

Thanks in advance,

a happy Virtualmin User

looks like the permissions are wrong for your awstats. Do you have your http user running as the domain owner or apache?

after you fix the issue… for future reference… you can add “>/dev/null 2>&1” to the end of your cron statement and you will not get an email anymore.

Thank you for your reply. I will put this behind the cronjobs.

I run every site in Fcgid mode, so my http user is running as domainowner. I think, if this is the one you mean?
Strange that this is wrong by default on both virtualmin servers. If I can fix the underlying problem, it would be even better I guess!

Yes thats correct… It is cut off but in your original post. It says to check for errors in the config file.


Hmm, also, what does this command output:

ls -ld /home/DOMAIN/awstats/

Does that directory exist, and is it owned by the Virtual Server owner?


drwxr-xr-x 2 gftest1 gftest1 4096 Nov 5 00:36 /home/gftest1/awstats/

The AWstats folder does exist, also with user as owner.


I found this line (added by Virtualmin/Webmin) in the scheduled cron jobs:
‘www-data Yes [ -x /usr/share/awstats/tools/ ] && /usr/share/awstats/tools/’

When I disabled the line, the log flood stops. Awstats keeps running fine. (I think because I also have the lines like ’ root Yes /etc/webmin/virtualmin-awstats/ DOMAIN.TLD’ which work properly and generate the stats).