Difference between revisions of "OS4X plugin os4xplugin clamav"

From OS4X
Jump to navigation Jump to search
(Created page with "Category:Plugins == Purpose == This plugin executes a virus scan on demand for every single file of the job. If a virus is found, the job will be aborted. == Requirement...")
 
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
  
 
== Purpose ==
 
== Purpose ==
This plugin executes a virus scan on demand for every single file of the job. If a virus is found, the job will be aborted.
+
This plugin executes a virus scan on demand for every single file of the job via [https://www.clamav.net/ ClamAV]. If a virus is found, the job will be aborted.
  
 
== Requirements ==
 
== Requirements ==
Line 10: Line 10:
 
*Enable more debug output: By default, the "<code>clamscan</code>" executable will be run with the parameter "<code>--quiet</code>", which will then be removed in order to output more statistical data.
 
*Enable more debug output: By default, the "<code>clamscan</code>" executable will be run with the parameter "<code>--quiet</code>", which will then be removed in order to output more statistical data.
 
*Absolute path of clamscan binary: The ClamAV scanner binary can be overriden with this parameter. The given file will be resolved either via <code>$PATH</code> or is given as absolute path. It must be executable.
 
*Absolute path of clamscan binary: The ClamAV scanner binary can be overriden with this parameter. The given file will be resolved either via <code>$PATH</code> or is given as absolute path. It must be executable.
*Maximum filesize (MB): Files bigger than this big will be skipped for the virus scanner.
+
*Maximum filesize (MB): Files bigger than this big will be skipped for the virus scanner. The default is 100MB in order to preserve memory.
  
 
== Return codes ==
 
== Return codes ==
 
*0: everything OK
 
*0: everything OK
 
*1: Number of parameters != 1; Config file <code>/etc/os4x.conf</code> not found; Config in database not readable; License not valid; XML file invalid or virus is found
 
*1: Number of parameters != 1; Config file <code>/etc/os4x.conf</code> not found; Config in database not readable; License not valid; XML file invalid or virus is found

Latest revision as of 10:45, 27 November 2024


Purpose

This plugin executes a virus scan on demand for every single file of the job via ClamAV. If a virus is found, the job will be aborted.

Requirements

  • File /etc/os4x.conf or configuration file referenced by environment variable $OS4X_CFGFILE. The temporary directory and the license file are obtained via the database that is configured here.

Configuration

  • Enable more debug output: By default, the "clamscan" executable will be run with the parameter "--quiet", which will then be removed in order to output more statistical data.
  • Absolute path of clamscan binary: The ClamAV scanner binary can be overriden with this parameter. The given file will be resolved either via $PATH or is given as absolute path. It must be executable.
  • Maximum filesize (MB): Files bigger than this big will be skipped for the virus scanner. The default is 100MB in order to preserve memory.

Return codes

  • 0: everything OK
  • 1: Number of parameters != 1; Config file /etc/os4x.conf not found; Config in database not readable; License not valid; XML file invalid or virus is found