@Lucas Kanashiro (lucaskanashiro)
Thanks for taking the time to read and answer it.
You're right, it is not a bug per se, more a serious shortcoming.
If we install the required packages, everything works fine.
However, if we modify one of the aforementioned folders to a symlink which points to another folder with the same contents, then the issue described in this thread pops up.
This is the first time I encounter this strange "symlink sensitivity" by any Ubuntu package and I believe this should never happen on Linux.
I understand that clamav is also implemented on Windows and this could explain this undesired behavior on Linux.
I have already posted a "feature request" on the <email address hidden> mailing list, but there is no response so far.
Mar 23 18:45:15 host systemd[1]: Started ClamAV virus database updater.
Mar 23 18:45:15 host freshclam[2460871]: ERROR: Can't open/parse the config file /etc/clamav/freshclam.conf
Mar 23 18:45:15 host systemd[1]: clamav-freshclam.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 23 18:45:15 host systemd[1]: clamav-freshclam.service: Failed with result 'exit-code'.
Then back to normal:
# sudo rm -f /etc/clamav
# sudo mv -f /etc/clamav.sav /etc/clamav
# sudo systemctl restart clamav-daemon
# sudo systemctl restart clamav-freshclam
# sudo systemctl status clamav-freshclam
● clamav-freshclam.service - ClamAV virus database updater
Loaded: loaded (/lib/systemd/system/clamav-freshclam.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-03-23 18:55:53 CET; 5s ago
Docs: man:freshclam(1) man:freshclam.conf(5) https://www.clamav.net/documents
Main PID: 2511510 (freshclam)
Tasks: 1 (limit: 18975)
Memory: 2.1M
CGroup: /system.slice/clamav-freshclam.service └─2511510 /usr/bin/freshclam -d --foreground=true
Mar 23 18:55:53 host systemd[1]: Started ClamAV virus database updater.
Mar 23 18:55:53 host freshclam[2511510]: Tue Mar 23 18:55:53 2021 -> ClamAV update process started at Tue Mar 23 18:55:53 2021
Mar 23 18:55:53 host freshclam[2511510]: Tue Mar 23 18:55:53 2021 -> daily.cld database is up to date (version: 26118, sigs: 3965203, f-level: 63,>
Mar 23 18:55:53 host freshclam[2511510]: Tue Mar 23 18:55:53 2021 -> main.cld database is up to date (version: 59, sigs: 4564902, f-level: 60, bui>
Mar 23 18:55:53 host freshclam[2511510]: Tue Mar 23 18:55:53 2021 -> bytecode.cvd database is up to date (version: 333, sigs: 92, f-level: 63, bui>
@Lucas Kanashiro (lucaskanashiro)
Thanks for taking the time to read and answer it.
You're right, it is not a bug per se, more a serious shortcoming.
If we install the required packages, everything works fine.
However, if we modify one of the aforementioned folders to a symlink which points to another folder with the same contents, then the issue described in this thread pops up.
This is the first time I encounter this strange "symlink sensitivity" by any Ubuntu package and I believe this should never happen on Linux.
I understand that clamav is also implemented on Windows and this could explain this undesired behavior on Linux.
I have already posted a "feature request" on the <email address hidden> mailing list, but there is no response so far.
@Utkarsh Gupta (utkarsh) freshclam. service - ClamAV virus database updater system/ clamav- freshclam. service; enabled; vendor preset: enabled)
man: freshclam. conf(5) /www.clamav. net/documents /usr/bin/ freshclam -d --foreground=true (code=exited, status=2)
Try this:
# sudo systemctl stop clamav-daemon
# sudo systemctl stop clamav-freshclam
# sudo mv -f /etc/clamav /etc/clamav.sav
# sudo ln -fsv /etc/clamav.sav /etc/clamav
'/etc/clamav' -> '/etc/clamav.sav'
# sudo systemctl restart clamav-daemon
# sudo systemctl restart clamav-freshclam
# sudo systemctl status clamav-freshclam
● clamav-
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Tue 2021-03-23 18:45:15 CET; 5s ago
Docs: man:freshclam(1)
https:/
Process: 2460871 ExecStart=
Main PID: 2460871 (code=exited, status=2)
Mar 23 18:45:15 host systemd[1]: Started ClamAV virus database updater. freshclam. conf freshclam. service: Main process exited, code=exited, status= 2/INVALIDARGUME NT freshclam. service: Failed with result 'exit-code'.
Mar 23 18:45:15 host freshclam[2460871]: ERROR: Can't open/parse the config file /etc/clamav/
Mar 23 18:45:15 host systemd[1]: clamav-
Mar 23 18:45:15 host systemd[1]: clamav-
Then back to normal: freshclam. service - ClamAV virus database updater system/ clamav- freshclam. service; enabled; vendor preset: enabled)
man: freshclam. conf(5) /www.clamav. net/documents slice/clamav- freshclam. service
└ ─2511510 /usr/bin/freshclam -d --foreground=true
# sudo rm -f /etc/clamav
# sudo mv -f /etc/clamav.sav /etc/clamav
# sudo systemctl restart clamav-daemon
# sudo systemctl restart clamav-freshclam
# sudo systemctl status clamav-freshclam
● clamav-
Loaded: loaded (/lib/systemd/
Active: active (running) since Tue 2021-03-23 18:55:53 CET; 5s ago
Docs: man:freshclam(1)
https:/
Main PID: 2511510 (freshclam)
Tasks: 1 (limit: 18975)
Memory: 2.1M
CGroup: /system.
Mar 23 18:55:53 host systemd[1]: Started ClamAV virus database updater.
Mar 23 18:55:53 host freshclam[2511510]: Tue Mar 23 18:55:53 2021 -> ClamAV update process started at Tue Mar 23 18:55:53 2021
Mar 23 18:55:53 host freshclam[2511510]: Tue Mar 23 18:55:53 2021 -> daily.cld database is up to date (version: 26118, sigs: 3965203, f-level: 63,>
Mar 23 18:55:53 host freshclam[2511510]: Tue Mar 23 18:55:53 2021 -> main.cld database is up to date (version: 59, sigs: 4564902, f-level: 60, bui>
Mar 23 18:55:53 host freshclam[2511510]: Tue Mar 23 18:55:53 2021 -> bytecode.cvd database is up to date (version: 333, sigs: 92, f-level: 63, bui>