Hi,

After more testing, I can rule out the disk space problem because I have
1TB free space. I can also rule out the permission problem because this
happens during fresh runs.

I discovered the problem I had was due to the use of the *Universal Naming
Convention (UNC) Path*, "\\xx-x411\clamav". Even on the same server where
"\\xx-x411\clamav" and "D:\clamav" are the same, the behaviors are
different as shown below.

With the "D:\clamav" path, it found that the database is not up to date,
then it gets the cld file, and no issues. WIth the UNC path, it downloads
the same cvd file and complains that the file exists. I wanted to use the
UNC path because I want to share the database across the servers.

Here is the log to show the problem:

PS D:\ClamAV\clamav-0.103.3-win-x64-portable\database> *rm -recurse **

PS D:\ClamAV\clamav-0.103.3-win-x64-portable\database>
\\xx-x411\clamav\clamav-0.103.3-win-x64-portable\freshclam.exe
*--datadir=d:\clamav\clamav-0.103.3-win-x64-portable\database*
ClamAV update process started at Fri Jul  9 15:48:10 2021
daily database available for download (remote version: 26226)
Time:    3.6s, ETA:    0.0s [========================>]  102.43MiB/102.43MiB
Testing database:
'd:\clamav\clamav-0.103.3-win-x64-portable\database\tmp.1276ba4a31\clamav-7f99d642a7a4902e4a2f435c323e2552.tmp-daily.cvd'
...
Database test passed.
daily.cvd updated (version: 26225, sigs: 3994327, f-level: 63, builder:
raynman)

*Received an older daily CVD than was advertised. We'll retry so the
incremental update will ensure we're up-to-date.*daily database available
for update (local version: 26225, remote version: 26226)

*Current database is 1 version behind.Downloading database patch # 26226...*
Time:    0.0s, ETA:    0.0s [========================>]   19.36KiB/19.36KiB
Testing database:
'd:\clamav\clamav-0.103.3-win-x64-portable\database\tmp.1276ba4a31\clamav-baae84e4ef91bcdfa772d7d82c8af6f8.tmp-daily.cld'
...
Database test passed.
daily.cld updated (version: 26226, sigs: 3994579, f-level: 63, builder:
raynman)
main database available for download (remote version: 59)
Time:    4.0s, ETA:    0.0s [========================>]  112.40MiB/112.40MiB
Testing database:
'd:\clamav\clamav-0.103.3-win-x64-portable\database\tmp.1276ba4a31\clamav-046d7008715c9c8fba4d462be7120643.tmp-main.cvd'
...
Database test passed.
main.cvd updated (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
bytecode database available for download (remote version: 333)
Time:    0.1s, ETA:    0.0s [========================>]  286.79KiB/286.79KiB
Testing database:
'd:\clamav\clamav-0.103.3-win-x64-portable\database\tmp.1276ba4a31\clamav-f4500f3362769ec4bcbdfcaa854f
cfb8.tmp-bytecode.cvd' ...
Database test passed.
bytecode.cvd updated (version: 333, sigs: 92, f-level: 63, builder:
awillia2)

PS D:\ClamAV\clamav-0.103.3-win-x64-portable\database> rm -recurse *

PS D:\ClamAV\clamav-0.103.3-win-x64-portable\database>
\\xx-x411\clamav\clamav-0.103.3-win-x64-portable\freshclam.exe
--datadir=\\xx-x411\clamav\clamav-0.103.3-win-x64-portable\database
ClamAV update process started at Fri Jul  9 15:51:05 2021
daily database available for download (remote version: 26226)
Time:    4.1s, ETA:    0.0s [========================>]  102.43MiB/102.43MiB
Testing database:
'\\xx-x411\clamav\clamav-0.103.3-win-x64-portable\database\tmp.dcd8c0cb40\clamav-a9ada8b934fb64989e60cabb093b72ec.tmp-daily.cvd'
...
Database test passed.
daily.cvd updated (version: 26225, sigs: 3994327, f-level: 63, builder:
raynman)
*Received an older daily CVD than was advertised. We'll retry so the
incremental update will ensure we're up-to-date.*
daily database available for download (remote version: 26226)
Time:    3.8s, ETA:    0.0s [========================>]  102.43MiB/102.43MiB
*Testing database:
'\\xx-x411\clamav\clamav-0.103.3-win-x64-portable\database\tmp.dcd8c0cb40\clamav-907671efc5b51d897ec211313228eb86.tmp-daily.cvd'
...*
Database test passed.

*ERROR: updatedb: Can't rename
\\xx-x411\clamav\clamav-0.103.3-win-x64-portable\database\tmp.dcd8c0cb40\clamav-907671efc5b51d897ec211313228eb86.tmp-daily.cvd
to daily.cvd: File exists*ERROR: Unexpected error when attempting to update
daily: Failed to read/write file to database directory
ERROR: Database update process failed: Failed to read/write file to
database directory
ERROR: Update failed.

On Thu, Jul 8, 2021 at 9:31 AM Michael Wang <mw...@unixlabplus.com> 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*
>
> 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?
> Thanks.
>
> Full log:
>
> PS C:\Users\m.wang> \\xxx\clamav\bin\freshclam.exe --datadir
> \\xxx\clamav\bin\database
> ClamAV update process started at Wed Jul  7 18:40:18 2021
> WARNING: Your ClamAV installation is OUTDATED!
> WARNING: Local version: 0.103.2 Recommended version: 0.103.3
> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
> daily database available for download (remote version: 26224)
> Time:   12.4s, ETA:    0.0s [========================>]
>  102.41MiB/102.41MiB
> Testing database:
> '\\xxx\clamav\bin\database\tmp.78a757d3cf\clamav-57fd2bf1f4d6d423e4896f0ef3e97c52.tmp-daily.cvd'
> ...
> Database test passed.
> ERROR: updatedb: Can't rename
> \\xxx\clamav\bin\database\tmp.78a757d3cf\clamav-57fd2bf1f4d6d423e4896f0ef3e97c52.tmp-daily.cvd
> to daily.cv
> d: File exists
> ERROR: Unexpected error when attempting to update daily: Failed to
> read/write file to database directory
> ERROR: Database update process failed: Failed to read/write file to
> database directory
> ERROR: Update failed.
>
_______________________________________________

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

Reply via email to