WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Problem updating ClamAV  (Read 8508 times)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Problem updating ClamAV
« on: January 21, 2012, 07:01:44 AM »
I was just trying to update clamav with command freshclam

Code: [Select]
$ freshclam
ClamAV update process started at Sat Jan 21 20:54:26 2012
WARNING: DNS record is older than 3 hours.
WARNING: Invalid DNS reply. Falling back to HTTP mode.
Reading CVD header (main.cvd): OK
Downloading main-54.cdiff [100%]
Killed

I'm using:
- tinycore 3.8.4
- ClamAV 0.97.2 (current clamav extension 0.97)

Its worked fine in the past.

The solution I found was to delete
Code: [Select]
daily.cvd
main.cld
mirrors.dat

Next time I run freshclam its ok.

This is documented here : http://forums.cpanel.net/f43/problem-starting-clamav-109321.html
Live long and prosper.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Problem updating ClamAV
« Reply #1 on: January 24, 2012, 04:59:59 PM »
Hey, I remember you had mentioned you would have a try at building an updated clamav.  If not, I can get to it in the next coming days.  An updated build would save a lot of pull on the clamav servers as that main file is about 30MB large if I recall.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Problem updating ClamAV
« Reply #2 on: January 24, 2012, 05:28:43 PM »
Hi Jason W,
I"m not sure if what i've done is correct, I'll try to submit it today so you can have a look at it.

I noticed you had a clamav-dev.tcz extension, will a standard compile of clamav NOT have the dev parts ?
Live long and prosper.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Problem updating ClamAV
« Reply #3 on: January 24, 2012, 07:46:24 PM »
A standard compile would have the dev stuff, which is normally separated out.  I will look at your extension when it comes in,

The clamav-dev.tcz extension is only 8kb, which makes almost no sense to separate out.  The dev stuff can be left in at almost no cost in size.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Problem updating ClamAV
« Reply #4 on: January 24, 2012, 08:48:01 PM »
I can't seem to remember to to find the ./configure options

I remember finding an option to specify to put the conf files in /usr/local/etc/clamav else they get put somewhere else by default.

Any tips about how to get that help file up ?

I've tryed
less README
less INSTALL
and had a look at the configure file
Live long and prosper.

Offline martin

  • Jr. Member
  • **
  • Posts: 87
Re: Problem updating ClamAV
« Reply #5 on: January 24, 2012, 08:55:33 PM »
Do you mean ./configure --prefix=/usr/local ?

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Problem updating ClamAV
« Reply #6 on: January 24, 2012, 08:59:00 PM »
Quote
o you mean ./configure --prefix=/usr/local ?

No that's not it, its a option to specify the location of the clamav conf files (clamd.conf and freshclam.conf)

I found help for it easy with the source's I downloaded at home, but I don't have access to that system right now.

I'm running tinycore on a computer at work.

Theres some way to get a look at all the configure options that clamav will accept, but bugger me I can't find it right now, its like my head is on holiday or the source I just downloaded is not the same as the 0.97.3 I have at home
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Problem updating ClamAV
« Reply #7 on: January 24, 2012, 09:01:32 PM »
Hi remus
Quote
Theres some way to get a look at all the configure options that clamav will accept,
Maybe you want   ./configure --help

Offline martin

  • Jr. Member
  • **
  • Posts: 87
Re: Problem updating ClamAV
« Reply #8 on: January 24, 2012, 09:02:08 PM »
Yeah, that's it. Rich only just beat me :)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Problem updating ClamAV
« Reply #9 on: January 24, 2012, 09:03:19 PM »
DOH !!!

I tried it before and it failed
Code: [Select]
$ ./configure --help
chmod: changing permissions of `configure.lineno': Operation not permitted
configure: error: cannot create configure.lineno; rerun with a POSIX shell

It has to be sudo ./configure --help
Thanks guys
Live long and prosper.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Problem updating ClamAV
« Reply #10 on: January 24, 2012, 11:30:18 PM »
Jason W,

My clamav.tcz lacks the following.

- clamav user/group
I think I'd create a start up script for this, can someone give me some pointers.

- comment out the "example" line in freshclam.conf and clamd.conf

I'm about to run out of internet access, and am unsure when I'll get backup online.

Live long and prosper.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Problem updating ClamAV
« Reply #11 on: January 24, 2012, 11:35:32 PM »
Here is the source dir for clamav, clamav is the /usr/local/tce.installed startup script, it creates the clamav user/group.  Running the script with compiletc.tcz installed should pretty much just make it happen.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Problem updating ClamAV
« Reply #12 on: January 25, 2012, 03:03:22 AM »
Sorry, but I don't see a link...

... Ok found your file, am importing.
« Last Edit: January 25, 2012, 06:17:17 AM by remus »
Live long and prosper.

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Problem updating ClamAV
« Reply #13 on: January 25, 2012, 06:33:56 AM »
While testing I got the following error.

Code: [Select]
$ tce-load -i clamav.tcz
adduser: invalid option -- 'H'
usage: adduser  [-u uid [-o]] [-g group] [-G group,...]
                [-d home] [-s shell] [-c comment] [-m [-k template]]
                [-f inactive] [-e expire mm/dd/yy] [-p passwd] [-n] [-r] name
       adduser  -D [-g group] [-b base] [-s shell] [-f inactive] [-e expire mm/dd/yy]
clamav.tcz: OK

code from /usr/local/tce.installed/clamav
Code: [Select]
#!/bin/sh

adduser -DH clamav

[ -d /usr/local/etc/clamav ] || mkdir /usr/local/etc/clamav

[ -f /usr/local/etc/clamav/clamd.conf ] || cp -p /usr/local/share/clamav/files/clamd.conf /usr/loc
al/etc/clamav/

[ -f /usr/local/etc/clamav/freshclam.conf ] || cp -p /usr/local/share/clamav/files/freshclam.conf
/usr/local/etc/clamav/

should the command "adduser -DH clamav" be changed to "adduser -Dh clamav" ?
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Problem updating ClamAV
« Reply #14 on: January 25, 2012, 09:05:01 AM »
Hi remus
I suspect that clamav wants to be in its own user and group, so maybe it should have been  g