ERROR: Can’t create temporary directory /var/clamav/clamav

the good old clamav gave me the above error on daemon starting:

[root@~]# service clamd start
Starting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************
LibClamAV Warning: *** The virus database is older than 7 days! ***
LibClamAV Warning: *** Please update it as soon as possible. ***
LibClamAV Warning: **************************************************
[ OK ]

not updated ? no problem, then run:

[root@~]# freshclam
ERROR: Can’t create temporary directory /var/clamav/clamav-323e2246d5837497b88b088d7860c35b
Hint: The database directory must be writable for UID 111 or GID 101

so the updated couldn’t complete,

the solution is simple

just run:

[root@~]# chmod 777 /var/log/clamav/freshclam.log