SOLVED Scan All Accounts with ClamAV?

Mehmet Sen

Registered
Aug 30, 2017
3
0
1
Turkiye
cPanel Access Level
Root Administrator
Hello.
I have installed clamav plugin from WHM.
Now I want to scan all accounts, or say 50 accounts at a time. How can i do that if I am the server owner? I know users can scan their own accounts by logging to their cpanel. Can i scan their accounts without logging to their cpanel one by one? Is there a way i can do that in WHM or SSH?
The following commands do not work. Can you help me.
Best regards...

Hi,
You can scan your accounts using the following commands :
clamscan -ir /home/username -l clamscanreport
If you wish to scan your whole server then use the below given command :
clamscan -ir / -l clamscanreport
After clamscan is completed a new file will be created with name clamscanreport which will contain your clam scan report.
 

Mehmet Sen

Registered
Aug 30, 2017
3
0
1
Turkiye
cPanel Access Level
Root Administrator
Thanks. I solved my problem.

This code deletes what it finds after scanning.

/usr/local/cpanel/3rdparty/bin/clamscan -r --remove /home -l clamscanreport

or
/usr/local/cpanel/3rdparty/bin/clamscan -r --remove /home/username -l clamscanreport
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Hello @Mehmet Sen,

I'm glad to see you were able to address the issue. That's correct, the path for clamscan with the cPanel & WHM ClamAV plugin is:

Code:
/usr/local/cpanel/3rdparty/bin/clamscan
Thanks!