Score:0

custom freshclam.conf not working in Ubuntu 20.04

ps flag
jau

This is a strange one. I'm running Ubuntu 20.04, and freshclam doesn't seem to like it when you try to point it at any config file other than what is default.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

I ran the dpkg-reconfigure clamav-freshclam command to create the default /etc/clamav/fresh.conf file. So freshclam is working fine. I'm explicitly passing the --config-file option to show this works.

# freshclam -V
ClamAV 0.103.2/26210/Wed Jun 23 11:10:24 2021
# freshclam --config-file /etc/clamav/freshclam.conf -v
Wed Jun 23 16:09:37 2021 -> *Current working dir is /var/lib/clamav/
Wed Jun 23 16:09:37 2021 -> *Loaded mirrors.dat:
Wed Jun 23 16:09:37 2021 -> *  version:    1
Wed Jun 23 16:09:37 2021 -> *  uuid:       c9cac848-2e7c-402a-9bc5-155f40dba609
Wed Jun 23 16:09:37 2021 -> ClamAV update process started at Wed Jun 23 16:09:37 2021
Wed Jun 23 16:09:37 2021 -> *Current working dir is /var/lib/clamav/
Wed Jun 23 16:09:37 2021 -> *Querying current.cvd.clamav.net
Wed Jun 23 16:09:37 2021 -> *TTL: 630
Wed Jun 23 16:09:37 2021 -> *fc_dns_query_update_info: Software version from DNS: 0.103.3
Wed Jun 23 16:09:37 2021 -> ^Your ClamAV installation is OUTDATED!
Wed Jun 23 16:09:37 2021 -> ^Local version: 0.103.2 Recommended version: 0.103.3
Wed Jun 23 16:09:37 2021 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Wed Jun 23 16:09:37 2021 -> *Current working dir is /var/lib/clamav/
Wed Jun 23 16:09:37 2021 -> *check_for_new_database_version: Local copy of daily found: daily.cvd.
Wed Jun 23 16:09:37 2021 -> *query_remote_database_version: daily.cvd version from DNS: 26210
Wed Jun 23 16:09:37 2021 -> daily.cvd database is up-to-date (version: 26210, sigs: 3992126, f-level: 63, builder: raynman)
Wed Jun 23 16:09:37 2021 -> *fc_update_database: daily.cvd already up-to-date.
Wed Jun 23 16:09:37 2021 -> *Current working dir is /var/lib/clamav/
Wed Jun 23 16:09:37 2021 -> *check_for_new_database_version: Local copy of main found: main.cvd.
Wed Jun 23 16:09:37 2021 -> *query_remote_database_version: main.cvd version from DNS: 59
Wed Jun 23 16:09:37 2021 -> main.cvd database is up-to-date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
Wed Jun 23 16:09:37 2021 -> *fc_update_database: main.cvd already up-to-date.
Wed Jun 23 16:09:37 2021 -> *Current working dir is /var/lib/clamav/
Wed Jun 23 16:09:37 2021 -> *check_for_new_database_version: Local copy of bytecode found: bytecode.cvd.
Wed Jun 23 16:09:37 2021 -> *query_remote_database_version: bytecode.cvd version from DNS: 333
Wed Jun 23 16:09:37 2021 -> bytecode.cvd database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2)
Wed Jun 23 16:09:37 2021 -> *fc_update_database: bytecode.cvd already up-to-date.

This is where things get weird. I copy the default freshclam.conf file to another location, and it then doesn't work. What's going on here?

# ls -la /etc/clamav/freshclam.conf 
-r--r--r-- 1 clamav adm 593 Jun 23 16:00 /etc/clamav/freshclam.conf
# cp -av /etc/clamav/freshclam.conf /etc/
'/etc/clamav/freshclam.conf' -> '/etc/freshclam.conf'
# ls -la /etc/freshclam.conf 
-r--r--r-- 1 clamav adm 593 Jun 23 16:00 /etc/freshclam.conf
# freshclam --config-file /etc/freshclam.conf 
ERROR: Can't open/parse the config file /etc/freshclam.conf

Adding -v doesn't change this output. I'm stumped! Actually, if I rename the default /etc/clamav/freshclam.conf to anything else, freshclam won't read it. Ehhh.

I also want to change the DatabaseDirectory to an nfs location, but that doesn't seem to work either. This seems very strange. Anyone else able to replicate this?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.