Awstats not updating (permission issue)

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.2
Webmin version 2.402
Virtualmin version 7.30.8
Webserver version Nginx 1.28.0
Awstats 7.9-1

I happen to experience the same as previous users. Awstats were generating reports correctly until one day when it stopped. The problem was a file permission on logs. (same as here in 2011 and here in 2023).

This was already reported but I would like to reopen the topic to try to figure out what is the cause of this. I don’t think I made any change on Awstat at the time.

Also I don’t understand why a file like:

-rw-rw----  1 www-data www-data virtual.site_access_log

cannot be access by a script that can be run as the virtual site user (member of the www-data group) or when it is launched by root as a cron job.

Any idea?

After further investigations, I realised that the virtual server user is not member of www-data but it is the other way round

$ getent group user
user:x:1000:www-data
$ getent group www-data
www-data:x:33:

That explains why the awstats script doesn’t have access to the logs.

Isn’t there a way to have logs generated with the following permissions, as I suppose it was before the breaking change:

-rw-rw----  1 user www-data virtual.site_access_log

As far as I know, that’s how log ownership is and has been for many years. None of my systems have ownership like you’re seeing, they are all owned by the domain owner user and have group ownership of the Apache user (www-data on Debian/Ubuntu, apache on EL), and I’m not sure why that would have changed on your system.

I don’t actually know how/where permissions get set, as it’s not in the Apache config. There may be an option in Virtualmin that effects this that you’ve altered, but I can’t find it, thus far.

I wish I could know what change I made triggered this but I did too many changes on the server as I was setting it up.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.