log file rotation troubleshooting

Hi,

I don't think log file rotation is working for the web access and error logs in /var/log/virtualmin. How can I troubleshoot this to see why I don't see any zipped files in there?

Status: 
Active

Comments

Do you see any files with numeric extensions, like .0 or .1 ?

No unfortunately only the _access_log and _error_log for each Virtual Server. No other files.

Try SSHing in as root and running the command :

logrotate -d -f /etc/logrotate.conf

and see if it reports any errors. This command will do a test log rotation without actually modifying any files.

I am seeing a bunch of these in the output. There might be other issues, but this is something that seems like it needs to be corrected. This is happening for all of the Virtual Servers.

Ignoring example.com.conf because of bad file mode.

I just checked and all of the conf files in /etc/logrotate.d seem to have the file mode of 750. It seems they should be 644? How would that happen?

I think I fixed it. I corrected the file modes and ran logrotate (had to use the -f switch) and it rotated all of the web access and error logs.

Follow up question:

Now that the logs are rotated, can I move them off of the server with no effects on anything? For example., has awstats already "used" them? Or does awstats refer to them when looking at a report?

You can remove rotated logs, as they should have been already incorporated into awstat's own data files.