WHM - Plesk - CWP

How to Run Antivirus Scan in CentOS Web Panel (CWP)?

If you are using Centos web panel (CWP), you can easily scan and clean your server for viruses and malware.

To scan for viruses and malware, follow the steps below.

  • Log in to your CWP panel as root.
  • Go to Security / Security Center from the Navigation menu on the left.
  • Click on Malware Scan on the page that opens.

If you are not an experienced user, do not make any changes to the current settings.

You can start the scan by selecting Account Scan, Web Scan, Email Scan or Custom scan.

You can use Custom Scan to scan the entire server, this scan may take a long time depending on your server size.

You do not need to wait after starting the scan, you can see the results later by following the steps below.

View Scan Results

  • Go to Security / Security Center from the Navigation menu on the left.
  • Click on Malware Scan on the page that opens.
  • Click on Options in the upper right.
  • Enter the Check scan history section.
  • Click on the Download log file button in the list that opens.

You can also access the logs from the /usr/local/cwp/.conf/clam directory.

Where are the Maldetect Clamscan logs?

You can access the log file by connecting as root via SSH or SFTP or by using the file manager from the directory path below.

/usr/local/maldetect/logs

Quarantine Index

You can see the quarantined suspicious files (if any) in the directory below.

/usr/local/cwp/.conf/clam/.quarantine

Schedule Daily Antivirus Scan

To schedule a daily antivirus scan on your server, follow these steps.

Connect to the server as root via Putty or terminal.

Let’s create a directory where reports will be saved.

mkdir /root/scan-results

Let’s go to the cron jobs directory.

cd /var/spool/cron

Let’s open the ‘root’ cron job.

nano root

Let’s create the cron scheduler (it will run every day at 23:10)

23 10 * * * clamscan --infected --log=/root/scan-results/scan-log-`date +\%Y-\%m-\%d`.txt --recursive /home

That’s it, virus scanning will be done every day at 23:10.

Now let’s check the daily scan results.

cd /root/scan-results

Let’s list the files.

ls

Vew the report.

nano scan-log-2024-12-25.txt

If everything is OK, you will see code similar to the one below.

/home/YOURINDEX/public_html/PHP-Malware-Collection-master/shell/aa.php: Win.Trojan.Hide-1 FOUND
/home/YOURINDEX/public_html/PHP-Malware-Collection-master/shell/Crystal shell.php: Win.Trojan.Shell-20 FOUND
/home/YOURINDEX/public_html/PHP-Malware-Collection-master/shell/CTT Shell.php: Win.Trojan.C99-4 FOUND

———– SCAN SUMMARY ———–
Known viruses: 8701453
Engine version: 1.0.7
Scanned directories: 39002
Scanned files: 203361
Infected files: 3
Data scanned: 17883.46 MB
Data read: 20844.57 MB (ratio 0.86:1)
Time: 8384.114 sec (139 m 44 s)
Start Date: 2024:12:14 20:35:18
End Date: 2024:12:14 22:55:02

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top