freshclam error, "clamd.conf" file not found

It seems that installing clamav via apt-get install clamav doesn't actually install the clamav daemon; it only installs the freshclam daemon. You'll probably want to install clamav-daemon as well. The first time clamd runs, it'll create /etc/clamav/clamd.conf.

Note that the clamav package does install clamscan, which you can invoke manually to scan specific files/directories. However, by default, nothing will be scanned automatically. clamav-daemon allows scans to be triggered remotely, but even that doesn't schedule scans or provide realtime protection.

This is a good reminder that you should never just install security software and forget about it. You need to make sure it's working properly. I'm sure plenty of people run sudo apt-get install clamav, then just assume it's working in the background--when, in reality, all that's running is freshclam.

If you're actually looking for realtime protection, instead of just trying to run a scan, user61995 mentioned a potential solution. I haven't tested it.

tl;dr: sudo apt install clamav-daemon to fix the error, but you still have to run scans manually to be protected; these packages don't provide realtime protection.


On-access scanning exists if you are looking for that. There's a kernel module: Dazuko. Take a look at the ClamAV manual chapter 4.1.1.