2

I am getting the following error while trying to manually run freshclam on Ubuntu 18.04, as super user (I already stopped the daemon as described in other questions).

# sudo freshclam 
Wed May 22 07:33:08 2019 -> ClamAV update process started at Wed May 22 07:33:08 2019
Wed May 22 07:33:08 2019 -> ^Your ClamAV installation is OUTDATED!
Wed May 22 07:33:08 2019 -> ^Local version: 0.100.3 Recommended version: 0.101.2
Wed May 22 07:33:08 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Wed May 22 07:33:32 2019 -> getfile: Can't write 8192 bytes to /var/lib/clamav/clamav-61ad7aac1e8b42b507986f04c334427d.tmp/clamav-cba52511a773dacb076f4e204c4b1a77.tmp
Wed May 22 07:33:32 2019 -> ^Can't download main.cvd from db.local.clamav.net
Wed May 22 07:33:33 2019 -> *Can't query main.0.93.0.0.6810DA54.ping.clamav.net

Manually creating the file works though, so I'm not sure this is a permission issue.

# mkdir /var/lib/clamav/clamav-63297260eb8cf259cb59552e4bddc3b3.tmp/
# dd if=/dev/urandom of=/var/lib/clamav/clamav-63297260eb8cf259cb59552e4bddc3b3.tmp/clamav-7802c73731c6f7f34959ac4d37b24f6e.tmp count=5840
5840+0 records in
5840+0 records out
2990080 bytes (3.0 MB, 2.9 MiB) copied, 0.0424701 s, 70.4 MB/s

I found the two sources below:

https://forums.cpanel.net/threads/getfile-cant-write-1448-bytes-to-usr-share-clamav-clamav-917a563483a6171fe02eac005.125857/

https://www.linuxquestions.org/questions/debian-26/warning-can%27t-download-main-cvd-from-db-local-clamav-net-786955/

But what they were suggesting did not help either (I don't have quotas, and I tried stopping AppArmor, but still the same issue.)

Any other ideas, what I should check?

1

Ok, I found the cause: the disk was full.

To make the answer complete, I'm leaving here my solution, how to expand the disk size using volumes:

# df -h /
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  3.9G  3.7G     0 100% /

We need /dev/mapper/ubuntu--vg-ubuntu--lv

# lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
  Size of logical volume ubuntu-vg/ubuntu-lv changed from 4.00 GiB (1024 extents) to <14.00 GiB (3583 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.


# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 3668992 (4k) blocks long.


# df -h /
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv   14G  3.7G  9.5G  28% /


# freshclam 
Wed May 22 08:06:49 2019 -> ClamAV update process started at Wed May 22 08:06:49 2019
Wed May 22 08:06:49 2019 -> ^Your ClamAV installation is OUTDATED!
Wed May 22 08:06:49 2019 -> ^Local version: 0.100.3 Recommended version: 0.101.2
Wed May 22 08:06:49 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Wed May 22 08:07:15 2019 -> Downloading main.cvd [100%]
Wed May 22 08:07:23 2019 -> main.cvd updated (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Wed May 22 08:07:24 2019 -> *Can't query main.58.93.1.0.6810DB54.ping.clamav.net
Wed May 22 08:07:32 2019 -> Downloading daily.cvd [100%]
Wed May 22 08:07:49 2019 -> daily.cvd updated (version: 25456, sigs: 1576656, f-level: 63, builder: raynman)
Wed May 22 08:07:49 2019 -> *Can't query daily.25456.93.1.0.6810DB54.ping.clamav.net
Wed May 22 08:07:49 2019 -> Downloading bytecode.cvd [100%]
Wed May 22 08:07:50 2019 -> bytecode.cvd updated (version: 328, sigs: 94, f-level: 63, builder: neo)
Wed May 22 08:07:50 2019 -> *Can't query bytecode.328.93.1.0.6810DB54.ping.clamav.net
Wed May 22 08:07:54 2019 -> Database updated (6142999 signatures) from db.local.clamav.net (IP: 104.16.219.84)
Wed May 22 08:07:54 2019 -> !NotifyClamd: Can't find or parse configuration file /etc/clamav/clamd.conf
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.