Clamav can't create freshclam.dat
by however from LinuxQuestions.org on (#6ET6Q)
Hello Forum,
i rarely scan my system for viruses and malwares as i travel with the old-belief in my mind that linux systems are virus-proof. However, recently, I received a (most likely) phishing email about my cam and microphone being monitored by a trojan malware.
Although that email worries me 0.1 out of ten, it reminded me that perhaps it's not a bad idea to check my system for viruses using clamav (that's all I've ever used).
So, I upgraded to the latest clamav and when I launched freshclam i get this error msg:
Code:bash-5.2# freshclam
ERROR: Can't create freshclam.dat in /usr/share/clamav
Hint: The database directory must be writable for UID 210 or GID 210
ERROR: Failed to save freshclam.dat!
WARNING: Failed to create a new freshclam.dat!
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
bash-5.2#I checked the user groups by:
Code:bash-5.2# groupadd -g 210 clamav
groupadd: group 'clamav' already exists
bash-5.2# useradd -u 210 -d /dev/null -s /bin/false -g clamav clamav
useradd: user 'clamav' already existsand run freshclam again but has the same error message. (and just for curiosity, i run clamscan and clamdscan and it confirmed the lack of a clamav-virus database):
Code:bash-5.2# clamscan
LibClamAV Error: cli_loaddbdir: No supported database files found in /usr/share/clamav
ERROR: Can't open file or directory
----------- SCAN SUMMARY -----------
Known viruses: 0
Engine version: 1.2.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.011 sec (0 m 0 s)
Start Date: 2023:09:16 11:03:06
End Date: 2023:09:16 11:03:06
bash-5.2# clamdscan
ERROR: Could not connect to clamd on LocalSocket /var/run/clamav/clamd.socket: No such file or directory
----------- SCAN SUMMARY -----------
Infected files: 0
Total errors: 1
Time: 0.000 sec (0 m 0 s)
Start Date: 2023:09:16 11:03:27
End Date: 2023:09:16 11:03:27
bash-5.2#Any ideas on what i should do to get clamav to scan my system?
Thanks in advance.
i rarely scan my system for viruses and malwares as i travel with the old-belief in my mind that linux systems are virus-proof. However, recently, I received a (most likely) phishing email about my cam and microphone being monitored by a trojan malware.
Although that email worries me 0.1 out of ten, it reminded me that perhaps it's not a bad idea to check my system for viruses using clamav (that's all I've ever used).
So, I upgraded to the latest clamav and when I launched freshclam i get this error msg:
Code:bash-5.2# freshclam
ERROR: Can't create freshclam.dat in /usr/share/clamav
Hint: The database directory must be writable for UID 210 or GID 210
ERROR: Failed to save freshclam.dat!
WARNING: Failed to create a new freshclam.dat!
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
bash-5.2#I checked the user groups by:
Code:bash-5.2# groupadd -g 210 clamav
groupadd: group 'clamav' already exists
bash-5.2# useradd -u 210 -d /dev/null -s /bin/false -g clamav clamav
useradd: user 'clamav' already existsand run freshclam again but has the same error message. (and just for curiosity, i run clamscan and clamdscan and it confirmed the lack of a clamav-virus database):
Code:bash-5.2# clamscan
LibClamAV Error: cli_loaddbdir: No supported database files found in /usr/share/clamav
ERROR: Can't open file or directory
----------- SCAN SUMMARY -----------
Known viruses: 0
Engine version: 1.2.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.011 sec (0 m 0 s)
Start Date: 2023:09:16 11:03:06
End Date: 2023:09:16 11:03:06
bash-5.2# clamdscan
ERROR: Could not connect to clamd on LocalSocket /var/run/clamav/clamd.socket: No such file or directory
----------- SCAN SUMMARY -----------
Infected files: 0
Total errors: 1
Time: 0.000 sec (0 m 0 s)
Start Date: 2023:09:16 11:03:27
End Date: 2023:09:16 11:03:27
bash-5.2#Any ideas on what i should do to get clamav to scan my system?
Thanks in advance.