Thanks very much for the new Ubuntu 12.04 LTS Virtualmin installer.
Everything seems fine, apart from these emails to admin regarding Awstats errors:
Create/Update database for config "/etc/awstats/awstats.mydomainname.com.conf" by AWStats version 7.0 (build 1.971) From data in log file "/var/log/virtualmin/mydomainname.com_access_log"... Phase 1 : First bypass old records, searching new record... Searching new records from beginning of log file... Phase 2 : Now process new records (Flush history on disk after 20000 hosts)... Error: Couldn't open file "/home/mydomainname/awstats/awstats052012.mydomainname.com.tmp.15000" for write: Permission denied Setup ('/etc/awstats/awstats.mydomainname.com.conf' file, web server or permissions) may be wrong. Check config file, permissions and AWStats documentation (in 'docs' directory).
I am trying to work through this but hope someone can also help.
The line:
Error: Couldn't open file "/home/mydomainname/awstats/awstats052012.mydomainname.com.tmp.15000" for write: Permission denied
led me to look there, but the file does not seem to exist.
The only file under /home/mydomainname/awstats/
is an htaccess file containing this:
AuthName "mydomainname.com statistics" AuthType Basic AuthUserFile /home/mydomainname/.awstats-htpasswd require valid-user
I hope this makes some sense to somebody and thank you very much for any help.
Otherwise, perhaps I could just switch off Awstats and the cron job?
Thanks again.
Howdy,
Can you paste in the contents of this command:
cat /etc/cron.d/awstats
Hello - thank you - I get this:
MAILTO=root
*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh
Generate static reports:10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh
So, in theory, all of those lines should be commented out while installing Virtualmin.
However, we've heard about a handful of cases where that hasn't happened, and we're not quite sure why that's the case at the moment :-)
However, the quick fix is to comment out all the lines in that file -- you don't need them for anything, Virtualmin's awstats processing is done elsewhere.
We'll continue to dig into why that isn't done automatically though, thanks for the report!
-Eric
Thanks for the help, Eric.
Sorry - just to be dumb and to be sure, comment out the commands in which file? - before I open up Virtualmin and go to the wrong place.
Many thanks again.
Howdy,
The contents of the file "/etc/cron.d/awstats" aren't necessary in a Virtualmin setup.
So you can use a text editor to edit /etc/cron.d/awstats, and comment out all the lines in that file (by adding a '#' to the beginning of each line).
-Eric
OK I have commented out everything in both:
/usr/share/awstats/tools/update.sh
and
/usr/share/awstats/tools/buildstatic.sh
It has stopped the emails coming though every ten minutes. Hope it hasn't done anything else it shouldn't have done.
Thanks again.
Sorry - posts crossed - will do as you say and put the others back the way I found them.
I just stumbled over the same issue here.
I installed a new Ubuntu 12.04 production VM, and the awstats cron job entries were not commented out.
There is a similar entry in Ubuntu 10.04 by the way:
This one doesn't cause error emails getting sent though; probably due to the
>/dev/null
.To disable the cron jobs, you can use Webmin's GUI too by the way.
I am also having this same issue, brand new install on ubuntu 12.04 LTS. I will comment out the lines.