Ubuntu – Freshclam error

clamav

After installing clamav and clamtk, when doing freshclam I receive this message:

freshclam
ERROR: Can't create temporary directory /var/lib/clamav/clamav-f52645d8e80b9b727228734e339d231d
Hint: The database directory must be writable for UID 1000 or GID 1000

Could somebody help?

Best Answer

I seem to remember getting this issue when I first started using clamav, going back through my notes I found I had written this:

First find out my uid and gid by typing at the command prompt: id your_username

Should give you a long line of text with a uid and gid in it somewhere, then type: sudo chown UID.GID /var/lib/clamav then sudo chmod 755 /var/lib/clamav

Change UID and GID with the values you got from the id Command above.

hope that helps