ClamAV "ERROR: Can't write to temporary directory"

total used free shared buffers cached Mem: 490 358 132 0 32 167 -/+ buffers/cache: 158 332 Swap: 0 0 0

Aha, I think that might be a large part of the issue there. I don’t think you have enough RAM to run the ClamAV process. You only have 490MB of RAM, and there isn’t any swap on your system.

That’s a fairly low-memory system there, I wouldn’t recommend running any daemon/service that doesn’t absolutely need to be running.

It does seem that ClamAV is able to run from the command line though when you’re doing it manually.

I’m really not sure what might cause all that :slight_smile:

I’m doing some Googling on that though, I’ll let you know what I come up with.

-Eric

Thank Eric, that was it.

I thought it met the min requirements - but it most have been that I just needed more RAM. I resized the server up to 1GB and retried and it loaded everything right up.

Thanks again, glad that is resolved. I had planed to resize it anyway, but was using this smaller server as a test one,

Chris

Super, I’m glad that’s working now!

-Eric

I’m having a similar issue on a Digital Ocean VPS running CentOS 6.4 32bit with 512mb of ram. However, in this instance, I’m getting the same error The selected virus scanning command does not work :
ERROR: Can’t write to temporary directory
even though I don’t have the daemon mode selected. It’s set to standalone.

If I set Allow mailbox users to create mail filters? to no, I’m able to save the changes on the Spam and Virus Scanning preferences page and everything works correctly (even virus scanning) albeit procmail filtering is disabled. The issue seems to revolve around the mail filtering option somehow.

Is there a way I could enable the mail filtering option outside of the “Spam and Virus Scanning” page to avoid this issue?

Thanks

I got it working by adding additional memory for a total 1gb of RAM. I was thinking I could drop back down to 512mb after enabling the option to allow users to create mail filters but figured I didn’t want to push my luck.

In short, if you’re having this problem, adding additional memory will solve the issue. Whether or not you can then drop the memory back down after enabling the mail filter option and not break anything is unknown.