How do I protect my Linux web server from viruses?

So, you want to run a web server and you are not the only person who will have the ability to upload files to it?  You might want to think about installing an antivirus scanner.  If you are running Linux (like I am), Clam AntiVirus is a good option.

So, how do you install it?

sudo apt-get install clamav

How do you update the virus definitions?

sudo freshclam

How do you scan the whole server for viruses?

clamscan -r /

If you want to scan the whole server for viruses and move any infected files, how do you do that?

clamscan -r –move=/home/administrator/quarantine /

So, the next step would be to set this task up in crontab, so it happens automatically, on a regular basis.

Leave a Reply

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