CWP Security Center schedule automatic virus scan

Started by Painkiller88, August 21, 2024, 02:00:43 PM

Previous topic - Next topic

Painkiller88

Hi,

Is it possible to enable a schedule for automatic virus scan?

Everytime i look into the CWP Security Center it tells me last scan 1 Month etc. so this is every time i start the scan manually in the Security Center.

Is there a way to schedule it automatically or is the Security Portal just not recorgnizing the automatic scans?

Thanks


Painkiller88

Thank you, i think it is working, it is scanning now with the test scan you recommended.

One thing i recorgnized using a second window to check if the log is created:

With the command you gave to start the test scan the file really has this name: virus-scan-report-date +\%Y-\%m-\%d.txt

so maybe because the command has the date command in 'date +\%Y-\%m-\%d'.txt and because of the ' it is taken as a string but at least it is created, will check again when the scan is done.

Thanks

Painkiller88

Ok i think it is because there is no space in your command between virus-scan-report and -date.

will check it once the scan is done

Starburst

#4
Good catch. Thanks, it's updated.

It uses the ` instead of the ' in the command line.

Been updated to:
clamscan --infected --log=/root/virus-scan-reports/virus-scan-report-`date +\%Y-\%m-\%d`.txt --recursive /home

Tested & Confirmed. :)

ontarget

Hi Starburst thank you for the kb article.
Ijust ran the script manually and i got the following message:

[root@vps11111 cron]# clamscan --infected --log=/root/virus-scan-reports/virus-scan-report-`date +\%Y-\%m-\%d`.txt --recursive /home
LibClamAV Warning: Detected duplicate databases /var/lib/clamav/bytecode.cvd and /var/lib/clamav/bytecode.cld, please manually remove one of them


Any ideas what should be done in this situation?

overseer

Seems to be a known bug with clamav; you should be able to safely delete the duplicate databases.
yum swap clamav-data clamav-data-empty
freshclam