User Tools

Site Tools


ubuntu:anti_virus:install_clamav

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ubuntu:anti_virus:install_clamav [2020/06/09 20:55] peterubuntu:anti_virus:install_clamav [2022/06/13 10:10] (current) peter
Line 1: Line 1:
 ====== Ubuntu - Anti Virus - Install ClamAV ====== ====== Ubuntu - Anti Virus - Install ClamAV ======
  
-clamav is an anti-virus application.+**clamav** is an anti-virus application.
  
 The clamav-daemon package creates a 'clamav' user; in order to allow ClamAV to scan system files, such as your mail spool, you can add clamav to the group that owns the files.  The clamav-daemon package creates a 'clamav' user; in order to allow ClamAV to scan system files, such as your mail spool, you can add clamav to the group that owns the files. 
Line 9: Line 9:
 ===== Install ClamAV ===== ===== Install ClamAV =====
  
-First we update the package repository:+Firstupdate the package repository:
  
 <code bash> <code bash>
Line 15: Line 15:
 </code> </code>
  
-Now we install the clamav scanner, the daemon and the database updater.+Now install the clamav scanner, the daemon and the database updater.
  
 <code bash> <code bash>
 sudo apt install clamav clamav-daemon clamav-freshclam sudo apt install clamav clamav-daemon clamav-freshclam
 </code> </code>
- 
-You can also install the **clamav-data** package, but the clamav-freshclam package is another (easier) way to update your virus definitions. 
  
 <WRAP info> <WRAP info>
 +**NOTE:**  You can also install the **clamav-data** package, but the clamav-freshclam package is another (easier) way to update your virus definitions.
 +
 On RHEL, CentOS or Scientific Linux, you only need to install the clamav package: On RHEL, CentOS or Scientific Linux, you only need to install the clamav package:
  
Line 63: Line 63:
 ===== The daily scan ===== ===== The daily scan =====
  
-The below cronjob will run a virus database definition update (so that the scan always has the most recent definitions) and afterwards run a full scan which will only report when there are infected files on the system.  It also does not remove the infected files automatically, you have to do this manually.  This way you make sure that it does not delete **/bin/bash** by accident.+The below cronjob will run a virus database definition update (so that the scan always has the most recent definitions) and afterwards run a full scan which will only report when there are infected files on the system.   
 + 
 +It also does not remove the infected files automatically, you have to do this manually.  This way you make sure that it does not delete **/bin/bash** by accident.
  
 <code bash> <code bash>
Line 70: Line 72:
 </code> </code>
  
-The **2>/dev/null** options keeps the **/proc** and such access denied errors out of the report.  The infected files however are still found and reported.+<WRAP info> 
 +**NOTE:**  The **2>/dev/null** options keeps the **/proc** and such access denied errors out of the report. 
 + 
 +The infected files however are still found and reported. 
 + 
 +</WRAP>
  
 Also make sure that your cron is configured so that it mails you the output of the cronjobs.  The manual page will help you with that. Also make sure that your cron is configured so that it mails you the output of the cronjobs.  The manual page will help you with that.
Line 85: Line 92:
 ===== Extra: the targeted scan ===== ===== Extra: the targeted scan =====
  
-The below cronjob is an example and you should adapt it as required.  It updates the virus definitions and scans the folder /var/www/sites/uploader.com/public-html/uploads/ two times per hour, and if it found any files it removes them.+The below cronjob is an example and you should adapt it as required. 
 + 
 +  It updates the virus definitions and scans the folder /var/www/sites/uploader.com/public-html/uploads/ two times per hour, and if it found any files it removes them.
  
 <code bash> <code bash>
ubuntu/anti_virus/install_clamav.1591736140.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki