ZFS clamscan doesn't initialize in freebsd 14

$ sudo freshclam
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
[user ~]$ ls -l /var/log/clamav
[user ~]$ chmod /var/log/clamav
usage: chmod [-fhv] [-R [-H | -L | -P]] mode file ...
[user ~]$ sudo mkdir /var/log/clamav
mkdir: /var/log/clamav: File exists
[user ~]$ sudo touch /var/log/clamav/clamd.log
[user ~]$ sudo chown -R vscan:vscan /var/log/clamav
chown: vscan: illegal group name
[user ~]$ sudo chown -R clamav:clamav /var/log/clamav
[user ~]$ freshclam
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
[user ~]$ doas freshclam
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).


sudo clamscan -r /home/mydirectory/
LibClamAV Error: cli_loaddbdir: No supported database files found in /var/db/clamav
ERROR: Can't open file or directory

----------- SCAN SUMMARY -----------
Known viruses: 0
Engine version: 1.3.0
Scanned directories: 0
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 0.004 sec (0 m 0 s)
Start Date: 2024:02:20 04:17:35
End Date: 2024:02:20 04:17:35

Looked at some of the helpful posts and made these entries in /etc/rc.conf

clamav_clamd_enable="YES"
clamav_freshclam_enable="YES"



[user~]$ sudo service clamav-freshclam onestart
Starting clamav_freshclam.
root:/home/user # /usr/local/bin/freshclam
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
root:/home/user # sudo service clamav-clamd onestart
Starting clamav_clamd.
root:/home/user # freshclam
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!

Upate: Something happened after all this, the command sudo clamscan -rv /home/myfolder worked

----------- SCAN SUMMARY -----------
Known viruses: 8685508
Engine version: 1.3.0
Scanned directories: 1
Scanned files: 49
Infected files: 10 # how do I set a quarantine folder and what changes do I make to the sudo clamscan -rv /home/ for clamav to automatically quarantine an infected file?
Data scanned: 2461.76 MB
Data read: 568.07 MB (ratio 4.33:1)
Time: 723.767 sec (12 m 3 s)
Start Date: 2024:02:20 05:51:06
End Date: 2024:02:20 06:03:10
 
Back
Top