Debian/Ubuntu Tips and Tricks


Debian/Ubuntu Tips and Tricks

Awstats: Error: Couldn’t open server log file … … access.log …. No such file or directory

Posted by chantra on April 9th, 2007

After an upgrade from Debian 3.1 (sarge) to Debian 4.0 (etch), awstats stopped automatically updating.

Awstats was complaining that the log files could found. By logging in to the server, user www-data was able to open the files, but still awstats was complaining.

After upgrading, the behaviour of awstats seem to have changed a bit. Updating the stats using resulted in the following error when using the command line:

www-data@host:~$ /usr/share/doc/awstats/examples/ now -awstatsprog=/usr/lib/cgi-bin/

/usr/lib/cgi-bin/ -update -configdir="/etc/awstats"
Update for config "/etc/awstats/"
With data in log file "/usr/share/doc/awstats/examples/ /var/log/apache2/access.log /var/log/apache2/access.log.1 |"...
Error: Couldn't open server log file "/usr/share/doc/awstats/examples/ /var/log/apache2/access.log /var/log/apache2/access.log.1 |" : No such file or directory
Setup ('/etc/awstats/' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

To work around this error, one of the possible reason (if you can confirm that user www-data can open the log files) is that does not get automatically executed, it is possible to force this by changing a line in /etc/awstats/ and change:

LogFile="/usr/share/doc/awstats/examples/ /var/log/apache2/access.log /var/log/apache2/access.log.1 |"


LogFile="perl /usr/share/doc/awstats/examples/ /var/log/apache2/access.log /var/log/apache2/access.log.1 |"

Please change the value of LogFile accordingly do your settings. Basically add perl at the beginning of the statement.

This fixed my issue, hopefully it will do the same for people reading this page :)

One Response to “Awstats: Error: Couldn’t open server log file … … access.log …. No such file or directory”

  1. I think that what you published was actually very reasonable.
    However, what about this? what if you typed a catchier post title?
    I ain't suggesting your information is not solid., however what if you added a post title to maybe grab folk's attention?
    I mean Awstats: Error: Couldn

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>