With a little side of applesauce...

Wednesday, June 3, 2009

Clamav - Unable to create temporary directory ERROR

I was getting the following error in /var/log/exim4/mainlog:
2009-06-03 10:46:38 1MBsfl-0000sC-SY malware acl condition: clamd:
ClamAV returned
/var/spool/exim4/scan/1MBsfl-0000sC-SY/1MBsfl-0000sC-SY.eml: Unable to
create temporary directory ERROR
2009-06-03 10:46:38 1MBsfl-0000sC-SY H=smtp.remote.com
[192.168.1.1] F=<user@bounce.remote.com>
temporarily rejected after DATA
2009-06-03 10:46:38 1MBsfa-0000rz-PH malware acl condition: clamd:
ClamAV returned
/var/spool/exim4/scan/1MBsfa-0000rz-PH/1MBsfa-0000rz-PH.eml: Unable to
create temporary directory ERROR
2009-06-03 10:46:38 1MBsfa-0000rz-PH H=(D7Y0PS91) [10.0.0.1]
F=<user@local.org> temporarily rejected after DATA


I floundered for a bit with so little information, but finally tracked it down to bad permissions on /tmp. The relevant clamd.conf line is:
TemporaryDirectory /tmp


And, the fix was:
chmod 1777 /tmp

1 comment:

Javen said...

AH! Thanks for this! Had this issue for a while. Thanks for taking the time to document it.