ClamAV Upgrade Ritual

  • user warning: Table 'cache' is marked as crashed and should be repaired query: SELECT data, created, headers, expire FROM cache WHERE cid = 'filter:1:7686127ccdf3885a996e60e10fd5ee0d' in /home/dowdle/public_html/montanalinux/includes/database.mysql.inc on line 121.
  • user warning: Table 'cache' is marked as crashed and should be repaired query: UPDATE cache SET data = '<p>Following the usual \'make uninstall\' prior to upgrading my clamav doesn\'t always ensure I will have no further problems. Generally the next step after you \'make install\' your new clamav. Then you want to run a \'freshclam\'. But here is where I constantly forget and am now documenting how I fix this LibClamAV Error:</p>\n<blockquote><p>[root@soyo clamav]# freshclam<br />\nClamAV update process started at Wed Nov 14 09:14:50 2007<br />\nmain.inc is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven)<br />\ndaily.inc is up to date (version: 4783, sigs: 35144, f-level: 21, builder: ccordes)<br />\nLibClamAV Error: Database Directory: /usr/local/share/clamav not locked</p></blockquote>\n<p>Not a lot of info on what exactly the not locked means, but if you suspect permissions you are probably right. Lets see:</p>\n<blockquote><p>[root@soyo clamav]# ls -lha<br />\ntotal 24K<br />\ndrwxrwxr-x 4 clamav clamav 4.0K Nov 14 08:48 .<br />\ndrwxr-xr-x 7 root root 4.0K Jul 2 10:31 ..<br />\ndrwxr-xr-x 2 clamav clamav 4.0K Nov 14 08:48 daily.inc<br />\n-rwxrwxr-- 1 root root 0 Nov 14 09:22 .dbLock<br />\ndrwxr-xr-x 2 clamav clamav 4.0K Nov 14 08:23 main.inc<br />\n-rw------- 1 clamav clamav 1.4K Nov 14 09:14 mirrors.dat</p></blockquote>\n<p>Okay so .dblock is the culprit.</p>\n<blockquote><p>[root@soyo clamav]# cd ..<br />\n[root@soyo share]# chown -R clamav.clamav clamav/<br />\n[root@soyo share]# freshclam<br />\nClamAV update process started at Wed Nov 14 09:23:19 2007<br />\nmain.inc is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven)<br />\ndaily.inc is up to date (version: 4783, sigs: 35144, f-level: 21, builder: ccordes)</p></blockquote>\n<p>Voilà!</p>\n<br class=\"clear\" />', created = 1411156538, expire = 1411242938, headers = '' WHERE cid = 'filter:1:7686127ccdf3885a996e60e10fd5ee0d' in /home/dowdle/public_html/montanalinux/includes/database.mysql.inc on line 121.
|

Following the usual 'make uninstall' prior to upgrading my clamav doesn't always ensure I will have no further problems. Generally the next step after you 'make install' your new clamav. Then you want to run a 'freshclam'. But here is where I constantly forget and am now documenting how I fix this LibClamAV Error:

[root@soyo clamav]# freshclam
ClamAV update process started at Wed Nov 14 09:14:50 2007
main.inc is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven)
daily.inc is up to date (version: 4783, sigs: 35144, f-level: 21, builder: ccordes)
LibClamAV Error: Database Directory: /usr/local/share/clamav not locked

Not a lot of info on what exactly the not locked means, but if you suspect permissions you are probably right. Lets see:

[root@soyo clamav]# ls -lha
total 24K
drwxrwxr-x 4 clamav clamav 4.0K Nov 14 08:48 .
drwxr-xr-x 7 root root 4.0K Jul 2 10:31 ..
drwxr-xr-x 2 clamav clamav 4.0K Nov 14 08:48 daily.inc
-rwxrwxr-- 1 root root 0 Nov 14 09:22 .dbLock
drwxr-xr-x 2 clamav clamav 4.0K Nov 14 08:23 main.inc
-rw------- 1 clamav clamav 1.4K Nov 14 09:14 mirrors.dat

Okay so .dblock is the culprit.

[root@soyo clamav]# cd ..
[root@soyo share]# chown -R clamav.clamav clamav/
[root@soyo share]# freshclam
ClamAV update process started at Wed Nov 14 09:23:19 2007
main.inc is up to date (version: 44, sigs: 133163, f-level: 20, builder: sven)
daily.inc is up to date (version: 4783, sigs: 35144, f-level: 21, builder: ccordes)

Voilà!