Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Have you tried just making a soft link from the file that clamAV usually expects to your own log file to write to on /mnt? –  Wilshire Jun 16 '11 at 20:05
    
Yep, tried that and I get the same error about checking permissions –  GrumpyCanuck Jun 16 '11 at 20:09
add comment

1 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.

share|improve this answer
    
I can definitely write to /mnt as I copied the file there. It has the same ownership and permissions as the one in /var/log/clamav. –  GrumpyCanuck Jun 16 '11 at 20:15
    
can you add your /etc/fstab config for /mnt/clamav and the file permission listing for the file from ls -l to your original question then for clarification. Thanks! –  Wilshire Jun 16 '11 at 20:19
    
File permissions: /var/log/clamav/clamav.log -rw-r----- 1 clamav adm 3364 2011-06-16 20:07 clamav.log –  GrumpyCanuck Jun 16 '11 at 20:25
    
For /etc/fstab and the /mnt directory: /dev/sdb /mnt auto defaults,nobootwait,comment=cloudconfig 0 0 –  GrumpyCanuck Jun 16 '11 at 20:27
    
For /mnt/clamav/clamav.log (where I want the file to be) -rw-r----- 1 clamav adm 1879 2011-06-16 19:47 /mnt/clamav/clamav.log –  GrumpyCanuck Jun 16 '11 at 20:28
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.