clamscan fails on fresh Debian Lenny install

Fresh install of a VPS partition of Debian Lenny
Clean install of Virtualmin GPL via install.sh

To reproduce:

Login to the Virtualmin interface and run the Post-Installation Wizard
Leave everything set to defaults in the wizard.
Next, click the "Re-check and refresh configuration" button in the System Information page.

Check config fails with a warning about ClamAV as follows:

The ClamAV program clamscan does not appear to be working properly :

LibClamAV Warning: ***********************************************************
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ***********************************************************
LibClamAV Warning: ***********************************************************
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ***********************************************************
ERROR: Can't write to temporary directory

----------- SCAN SUMMARY -----------
Known viruses: 623664
Engine version: 0.94.2
Scanned directories: 0
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Time: 2.516 sec (0 m 2 s)

Changing to clamdscan on the "spam and virus scanners" page fixes the issue, but if you try to switch back to clamscan, you get the error again.

Status: 
Closed (fixed)

Comments

How much memory do you have on this system?

Also, is the /tmp directory world-writable?

It isn't showing as a memory issue, but I've got it setup with 256mb. I can easily change it to more for testing.

/tmp is: drwxrwxrwt 6 root root 4096 Sep 24 00:43 tmp
/var/tmp is: drwxrwxrwt 2 root root 4096 Aug 31 03:39 tmp

Of note, /etc/clamav/clamd.conf contains this line:

# TemporaryDirectory is not set to its default /tmp here to make overriding
# the default with environment variables TMPDIR/TMP/TEMP possible

However, this is a clean install of Virtualmin GPL, so it's the installer setting things up that way.

Mark

Ok, those permissions look fine.

You might want to try increasing RAM if you can, as I've seen that "can't write to temporary directory" error from clamav when it is actually out of RAM.

Yes, it was a memory issue. Increasing memory to 512 MB fixed the problem. Sorry to bug you folks.

Cool, glad that fixed it. Unfortunately clamav is very memory-hungry..

Automatically closed -- issue fixed for 2 weeks with no activity.