Ubuntu – Changing location of ClamAV logging files

clamavloggingUbuntu

I've run into a weird problem with ClamAV that I have been unable to resolve, due to a incredibly non-informative error message.

I've installed ClamAV via aptitude on an Ubuntu box (ClamAV 0.96.5/13202 according to the system) up on EC2 and it is 100% stock. We have an additional drive mounted under /mnt where we put all our log files.

When I start it up with the log files in the default location, it runs just fine. However, if I change the configuration file from /var/log/clamav/clamav.log to /mnt/clamav/clamav.log I get the error

ERROR: Can't open /mnt/clamav/clamav.log in append mode (check permissions!).
ERROR: Can't initialize the internal logger

It's the same file with the same permissions on it, just in a different location.

Any thoughts or tips on how to resolve this problem would be greatly appreciated.

Best Answer

Check to make sure the permissions are set so that clam can actually write to /mnt/clamav/clamav.log. You can use chmod to change the permissions of the file. It could also be that the the drive mounted is stated in /etc/fstab to be read-only.