-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mark Fraser wrote:
| I am having a problem with clam occasionally when it does an update.
| Specifically what happens is that my /var/amavis/tmp directory fills
up with
| temp files. This seems to happens when clam fails to download an
update. My
| freshclam.conf file is set to download an update 24 times a day. What
I see
| when this has happened is that there is a "*.cvd" file in the
| /var/lib/clamav directory, see the following ls:
|
| total 24
| 4 drwxr-xr-x 4 clamav clamav 4096 Apr 8 09:43 .
| 8 drwxr-xr-x 35 root root 4096 May 29 2007 ..
| 0 -rw-r--r-- 1 root root 0 Apr 7 05:00 *.cvd
| 4 drwxr-xr-x 2 clamav clamav 4096 Apr 8 08:43 daily.inc
| 4 drwxr-xr-x 2 clamav clamav 4096 Apr 7 04:43 main.inc
| 4 -rw--- 1 clamav clamav 1196 Apr 8 09:43 mirrors.dat
|
| I could not initially determine why I would have a "*.cvd" file in that
| directory, until I was looking at my cron.daily and found that there is a
| freshclam script in it with the following contents:
|
| #!/bin/bash
|
| # Remove garbage occasionally left after unsuccessful updates
| /bin/touch -a /var/lib/clamav/*.cvd
| /usr/sbin/tmpwatch 72 /var/lib/clamav
|
| I do not know why this script is here, but I do know that the "touch"
| command will create a file called "*.cvd" if there are no files ending
with
| "cvd" in that directory.
| The question is what happened to the original "cvd" files. I was
looking at
| the source code for clamav. and found where I think that it removes
the old
| copies of the data files before it downloads new ones, but I am a little
| rusty in C. if that is the case then should I modify this freshclam script
| to look like the following, or am I missing the bigger picture, I.e. do I
| really need this script in the daily cron? I originally put it in there I
| believe because it was in the general installation instructions for the
| version of clamav that I started with.
|
| I hope that this is clear enough for someone to have a logical answer for
| me. If not then I will answer any questions.
|
| Respectfully,
|
| Mark P. Fraser
Mark,
(1) Please notify your product packer (RedHat, I'm guessing), that the
script needs updating so others don't end up in this situation.
#!/bin/bash
# Remove garbage occasionally left after unsuccessful updates
find /var/lib/clamav/ -type f -name '*.cvd' -exec touch -a '{}' ';'
find /var/lib/clamav/ -type d -name '*.inc' | while read dir; do find
$dir -exec touch -a '{}' ';' ; done
/usr/sbin/tmpwatch 72 /var/lib/clamav
(2) The older .cvd files have been deprecated, and the new software
will automatically update to the new format when it sees .cvd files in
the directory. The software will still work with the .cvd files. Be
careful not to have a .cvd file if you have a corresponding .inc
directory, you will end up with duplicate database entries if you do.
Good Luck,
James
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH+6y7kNLDmnu1kSkRAv7QAJwKHQ9FDBMniWA1EfvN7lT6bHRj5wCeLxSO
Xo0nFIGvhQoRW9MSnyCiOY8=
=4XWH
-END PGP SIGNATURE-
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html