
This however from a security stand point is a complete bull-shit, that way everybody that has a physical ssh account on the server will be able to read your /var/log/apache2/. So now to let’s set some permissions to allow the www-data user to be able to access /var/log/apache2.ĭebian:~# chmod 755 -R /var/log/apache2/*

Setup (‘/etc/awstats/’ file web server or permissions) may be wrong.Ĭheck config file permissions and AWStats documentation (in ‘docs’ directory). To do that you have to allow all users to have a read access over both /var/log/apache2/access.log and /var/log/apache2/error.log otherwise you will receiver errors like:ĭebian:~# sudo -u Create/Update database for config “/etc/awstats/” by AWStats version 6.7 (build 1.892)įrom data in log file “/var/log/apache2/access.log”…Įrror: Couldn’t open server log file “/var/log/apache2/access.log” : Permission denied Thus it’s necessery to work out the default Debian restrictive permissions to the Apache webserver logs to “allow†Awstats to be able to access the log files and consequently generate it’s statistics. Therefore Awstats cannot swith to the /var/log/apache2/ directory and consequently cannot process the apache access.log file which by the way again has restrictive permissions as you can see below:

This is quite restrictive, awstats runs by default with the www-data user which is actually the user name used by Apache webserver on Debian platform. By default the permissions of /var/log/apache2/ are as shown below:ĭrwxr-x- 2 root adm 4096 Mar 21 14:18 /var/log/apache2/
