Problem using Freshclam to update Virus Defs
I just updated the three Clamav components using YUM and there were no errors or problems.
However, when I rebooted the system there was a message stating that the anti virus definitions were older then 7 days and that I should update the anti virus definitions. I tried to use Freshclam to do this and got the following messages: [root@centos5 ~]# freshclam ClamAV update process started at Thu Oct 1 09:12:25 2009 main.cvd is up to date (version: 51, sigs: 545035, f-level: 42, builder: sven) ERROR: chdir_tmp: Can't create directory ./clamav-53a663906264d1cc34065aed10e96dc1 WARNING: Incremental update failed, trying to download daily.cvd ERROR: getfile: Can't create new file /var/clamav/clamav-22684762b31aca0b03442e96d5dc5dad in /var/clamav Hint: The database directory must be writable for UID 102 or GID 103 WARNING: Can't download daily.cvd from db.us.clamav.net [root@centos5 ~]# The 102/103 (user/group) are for user 'amavis'. Below are the permissions for the /var/clamav: [root@centos5 ~]# cd /var/clamav [root@centos5 clamav]# ls -la |more total 89988 drwxr-xr-x 5 clamav clamav 4096 Oct 1 08:53 . drwxr-xr-x 32 root root 4096 Apr 3 22:49 .. drwxr-xr-x 2 amavis amavis 4096 May 3 15:32 clamav-2eb44880df1071d11bd3478b3459f078 -rw-r--r-- 1 amavis amavis 1922048 Jun 20 17:54 daily.cld -rw-r--r-- 1 clamav clamav 733428 Jun 17 19:09 daily.cvd -rw-r--r-- 1 amavis amavis 895232 Mar 24 2009 daily.cvd.rpmnew drwxr-xr-x 2 amavis amavis 4096 Sep 30 22:41 daily.inc -rw-r--r-- 1 amavis amavis 47079936 Jun 20 11:01 main.cld -rw-r--r-- 1 clamav clamav 21253696 Jun 17 19:09 main.cvd -rw-r--r-- 1 amavis amavis 20091559 Mar 24 2009 main.cvd.rpmnew drwxr-xr-x 2 amavis amavis 4096 Apr 1 2009 main.inc -rw------- 1 amavis amavis 676 Oct 1 09:12 mirrors.dat [root@centos5 clamav]# root@centos5 daily.inc]# ls -la |more total 2392 drwxr-xr-x 2 amavis amavis 4096 Sep 30 22:41 . drwxr-xr-x 5 clamav clamav 4096 Oct 1 08:53 .. -rw-r--r-- 1 amavis amavis 17992 Mar 31 2009 COPYING -rw-r--r-- 1 amavis amavis 214 Mar 31 2009 daily.cfg -rw-r--r-- 1 amavis amavis 31291 Mar 31 2009 daily.db -rw-r--r-- 1 amavis amavis 6752 Apr 1 2009 daily.fp -rw-r--r-- 1 amavis amavis 6050 Mar 31 2009 daily.ftm -rw-r--r-- 1 amavis amavis 35388 Mar 31 2009 daily.hdb -rw-r--r-- 1 amavis amavis 1098 Mar 31 2009 daily.hdu -rw-r--r-- 1 amavis amavis 1196 Mar 31 2009 daily.ign -rw-r--r-- 1 amavis amavis 711 Apr 1 2009 daily.info -rw-r--r-- 1 amavis amavis 320 Mar 31 2009 daily.ldb -rw-r--r-- 1 amavis amavis 2055412 Apr 1 2009 daily.mdb -rw-r--r-- 1 amavis amavis 28749 Mar 31 2009 daily.mdu -rw-r--r-- 1 amavis amavis 190956 Apr 1 2009 daily.ndb -rw-r--r-- 1 amavis amavis 5909 Mar 31 2009 daily.ndu -rw-r--r-- 1 amavis amavis 3817 Mar 31 2009 daily.pdb -rw-r--r-- 1 amavis amavis 2975 Mar 31 2009 daily.wdb -rw-r--r-- 1 amavis amavis 3448 Apr 1 2009 daily.zmd [root@centos5 daily.inc]# [root@centos5 main.inc]# ls -la |more total 43440 drwxr-xr-x 2 amavis amavis 4096 Apr 1 2009 . drwxr-xr-x 5 clamav clamav 4096 Oct 1 08:53 .. -rw-r--r-- 1 amavis amavis 17992 Apr 23 2008 COPYING -rw-r--r-- 1 amavis amavis 4725917 Mar 29 2009 main.db -rw-r--r-- 1 amavis amavis 6141 Mar 29 2009 main.fp -rw-r--r-- 1 amavis amavis 716040 Mar 29 2009 main.hdb -rw-r--r-- 1 amavis amavis 318 Mar 29 2009 main.info -rw-r--r-- 1 amavis amavis 23388761 Mar 29 2009 main.mdb -rw-r--r-- 1 amavis amavis 15529131 Mar 29 2009 main.ndb -rw-r--r-- 1 amavis amavis 217 Apr 23 2008 main.zmd [root@centos5 main.inc]# I'm running Centos 5.3 and I'm a newbie. If anyone can help me resolve this issue it would be greatly appreciated. Do I have to use the 'chmod command' and if so where would I point it to in order to make the changes. I possible, please provide a specific example. I don't want to wreck my system. Thanks all. |
just do the following, as root, then see how you go:
Code:
cd /var |
Hi,
Might be easiest to change group write permissions and add 'amavis' as a secondary group for clamav Code:
chmod -R g+w /var/clamav <edit>whoops.. a bit slow </edit> |
If you can give us some feedback on whether this succeeded for you or not, that would be great, basically for other users down the line....
|
I used yum to update Clamav. (yum update clamav)
This ran to completion without any problems. However I had to do a separate yum update on 'clamav-db.i386' which ran to completion without any problems. I then tried to use 'freshclam' to bring the virus database up to the most current level and this didn't work because of the problem stated in my list question. I did issued the following commands as suggested: cd /var chown -R clamav:amavis clamav/ chmod -R 770 clamav/ freshclam However running freshclam didn't work because of the problem with directory permissions: Being I had a good back up of my system I figured I'd mess around a little so I just did a: cd /var/clamv chmod -R 775 clamav ran freshclam again and it worked. I have no idea why /user/group/everyone/...the everyone part needed read/write/execute but it did. Now I'll change the everyone part back to read/execute. Go figure??? |
All times are GMT -5. The time now is 03:46 AM. |