Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: Painkiller88 on August 21, 2024, 02:00:43 PM

Title: CWP Security Center schedule automatic virus scan
Post by: Painkiller88 on August 21, 2024, 02:00:43 PM
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
Title: Re: CWP Security Center schedule automatic virus scan
Post by: Starburst on August 21, 2024, 04:35:35 PM
Create a small KB article for everyone on this topic:

https://kb.starburstservices.com/control-web-panel-cwp/control-web-panel-cwp-admin-tutorials/schedule-daily-anti-virus-scan-with-clamav/ (https://kb.starburstservices.com/control-web-panel-cwp/control-web-panel-cwp-admin-tutorials/schedule-daily-anti-virus-scan-with-clamav/)

Feedback is always welcome.
Title: Re: CWP Security Center schedule automatic virus scan
Post by: Painkiller88 on August 21, 2024, 05:01:30 PM
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
Title: Re: CWP Security Center schedule automatic virus scan
Post by: Painkiller88 on August 21, 2024, 05:14:36 PM
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
Title: Re: CWP Security Center schedule automatic virus scan
Post by: Starburst on August 21, 2024, 05:31:38 PM
Good catch. Thanks, it's updated.

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

Been updated to:
Code: [Select]
clamscan --infected --log=/root/virus-scan-reports/virus-scan-report-`date +\%Y-\%m-\%d`.txt --recursive /home
Tested & Confirmed. :)