Hi there, On Thu, 8 Jul 2021, Michael Wang wrote:
I am running the freshclam.exe like this: PS C:\Users\m.wang> \\xxx\clamav\bin\freshclam.exe --datadir \\xxx\clamav\bin\database and I got the following error: ERROR: updatedb: *Can't rename* \\xxx\clamav\bin\database\tmp.78a757d3cf\clamav-57fd2bf1f4d6d423e4896f0ef3e97c52.tmp-daily.cvd to daily.cv d: *File exists*
Is this a new installation? Have you had difficulties with it? Maybe the process which is running freshclam does not have permission to overwrite the old .cvd file with the new version it's just created? Have you checked the permissions etc. on the file "daily.cvd"? Are you sure that you are running an up-to-date version of freshclam?
I am thinking of removing the *.cvd files before running freshclam, but is there an option to make freshclam to override the existing old *.cvd files?
It's a long time since I looked at a ClamAV installation on Windows so my knowledge of the OS isn't current. Having said that, it should not be necessary for you to intervene in any way - and especially not to delete old .cvd files - because the whole point of using freshclam is that to update a .cvd file it makes a copy of the existing file and modifies that copy in place using a small difference file which is the actual download. Then it replaces the original file with the newly- modified version. Obviously to do that the freshclam process needs the appropriate permissions. It only ever needs to download the full .cvd file once, and that is when it is first run immediately after installation. In principle though, there's no compelling reason not to delete the old files (except that, if you do download the full file repeatedly, Cloudflare might possibly decide that your IP is being abusive and in that case it would prevent you from making any further connections for some time).
daily database available for download (remote version: 26224) Time: 12.4s, ETA: 0.0s [========================>] 102.41MiB/102.41MiB
It would be great if we could get an Internet connection like that here (but I digress). Unless this is the first time that you have installed ClamAV, this looks wrong. For each run of freshclam you should be seeing a download of only a few kilobytes (the size of a 'difference' file), not something over a hundred megabytes. As of today, 8 Jul 2021, version 26224 of the daily database is the current version; here's the extract from the freshclam log for my clamd server updating to version 26224 yesterday: 8<---------------------------------------------------------------------- Wed Jul 7 16:42:18 2021 -> Received signal: wake up Wed Jul 7 16:42:18 2021 -> ClamAV update process started at Wed Jul 7 16:42:18 2021 Wed Jul 7 16:42:20 2021 -> daily database available for update (local version: 26223, remote version: 26224) Wed Jul 7 16:42:26 2021 -> Testing database: '/EXPORTS/clamav/databases/tmp.be2acad156/clamav-e2cd2cc90e2ecd40669de6e677d412e0.tmp-daily.cld' ... Wed Jul 7 16:42:51 2021 -> Database test passed. Wed Jul 7 16:42:51 2021 -> daily.cld updated (version: 26224, sigs: 3993963, f-level: 63, builder: raynman) Wed Jul 7 16:42:51 2021 -> main.cvd database is up-to-date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr) Wed Jul 7 16:42:51 2021 -> bytecode.cld database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2) Wed Jul 7 16:42:52 2021 -> Clamd successfully notified about the update. 8<---------------------------------------------------------------------- As you can see this very typical download took around six seconds, and as this is a British Telecom business line which maxes out at about 1.5 Mbit/second download speed (please don't...) at the very most this could have been no more than about a one-megabyte download. -- 73, Ged. _______________________________________________ clamav-users mailing list clamav-users@lists.clamav.net https://lists.clamav.net/mailman/listinfo/clamav-users Help us build a comprehensive ClamAV guide: https://github.com/vrtadmin/clamav-faq http://www.clamav.net/contact.html#ml