LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-01-2009, 08:41 AM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Rep: Reputation: 34
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.

Last edited by swamprat; 10-01-2009 at 08:43 AM.
 
Old 10-01-2009, 10:24 AM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
just do the following, as root, then see how you go:
Code:
cd /var
chown -R clamav:amavis clamav/
chmod -R 770 clamav/ 
freshclam
This will give complete read/write/execute capabilities to clamav and amavis on this directory. You may need to tweak to suit your situation.
 
Old 10-01-2009, 10:51 AM   #3
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
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
usermod -G amavis clamav
cheers

<edit>whoops.. a bit slow </edit>

Last edited by kbp; 10-01-2009 at 10:52 AM.
 
Old 10-03-2009, 11:36 AM   #4
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
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....
 
Old 10-03-2009, 08:07 PM   #5
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Original Poster
Rep: Reputation: 34
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???
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Anti-Virus Scan (avscan) update steve-a-reno Linux - Software 3 01-27-2009 03:25 PM
KlamAV Anti-Virus Manager Update error? suse91pro Linux - Software 7 11-05-2008 07:26 AM
iptables rules to allow Virus Scanner to Update dontrotter Linux - Security 8 10-22-2007 10:06 PM
ClamAV (Freshclam) config problem - cannot append to log file tp11235 Linux - Security 6 09-29-2006 03:54 PM
iptables rules conflict with downloading LinuxShield virus defs billgist90018 Linux - Networking 1 01-16-2006 08:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration