I have a CentOS server storing files for windows users.
How do I scan for windows viruses in these files, and meanwhile prevent quarantine and other measures?
I do not want the files altered in any way, and would prefer if it can be done purely in command line with parsable results.
The antivirus we have a license for is Kaspersky Endpoint Security.
That is the preferred antivirus, but the question applies to Linux Anti-viruses in general.
Best Answer
Untested, but if you are happy using ClamAV the following should work:
Install the ClamAV (enabling EPEL repo first):
Via: https://www.clamav.net/documents/installing-clamav#rhel
Then you can update ClamAV:
Then scan:
--infected (-i)
: Only print infected files.--recursive (-r)
: Scan directories recursively. All the subdirectories in the given directory will be scanned.It's worth noting that by default
clamscan
does not remove files, you would have to manually set the switch:--remove[=yes/no(*)]
Via: https://linux.die.net/man/1/clamscan
Regarding scanning for windows signatures in linux I will refer you to this accepted answer on AskUbuntu: Does ClamAV Scan Windows virus?