Manual talk:$wgAntivirusSetup

ClamAV
If you can try to use "clamdscan" instead of "clamscan", as clamdscan is much faster than clamscan.
 * How would you set this up. Just changing clamscan to clamdscan does not do the job. I always get error message 2 meaning that the file was not checked. :( Any hint is welcome. Cheers --&#91;&#91;kgh&#93;&#93; 18:43, 23 August 2011 (UTC)
 * insert --fdpass into the command line when using clamdscan. Else you're probably getting permissions errors. ClamD does not log these unless "LogVerbose" is set to true in it's configuration, and this is not the default. Draeath 17:00, 23 November 2011 (UTC)
 * Here's my configuration. This is working for me in a mostly-vanilla Debian setup... Draeath 17:05, 23 November 2011 (UTC)


 * Hmm ... does not work for me. :( I always get code 2 virus found. Apropos, you do not have to set $wgAntivirusRequired since this is already done in DefaultSettings.php. Cheers --&#91;&#91;kgh&#93;&#93; 17:16, 24 November 2011 (UTC)

ClamAV on Windows(SOLVED)
A patch to the code was required. Incorporated into SVN starting at MediaWiki 1.16alpha R57706.

my website is http://festiva.bntbtc.com

I'm trying to setup ClamAVWin with Windows Server 2008 R2, I can get it to scan on the command line like so:

C:\Users\Administrator>"C:\Program Files (x86)\ClamWin\bin\clamscan.exe" --database=c:\avdb --no-summary c:\forefrontinstall.log c:\forefrontinstall.log: OK C:\Users\Administrator>

and heres my setup in localsettings.php:

$wgAntivirus = "ClamAV"; $wgAntivirusRequired = true; $wgAntivirusSetup = array(    #setup for clamav     'ClamAV' => array ( 'command' => "C:/Program Files (x86)/ClamWin/bin/clamscan.exe --database=C:\avdb --no-summary ", 'codemap'=> array (            "0"=>  AV_NO_VIRUS, #no virus             "1"=>  AV_VIRUS_FOUND, #virus found             "52"=> AV_SCAN_ABORTED, #unsupported file format (probably immune)             "*"=>  AV_SCAN_FAILED, #else scan failed         ), 'messagepattern'=> '/.*?:(.*)/sim', ),     #setup for f-prot     'f-prot' => array ( 'command' => "f-prot ", 'codemap'=> array (            "0"=> AV_NO_VIRUS, #no virus             "3"=> AV_VIRUS_FOUND, #virus found             "6"=> AV_VIRUS_FOUND, #virus found             "*"=> AV_SCAN_FAILED, #else scan failed         ), 'messagepattern'=> '/.*?Infection:(.*)$/m', ), );
 * 1) Setup clam antivirus

yet I contiunue to get errors!! it still says my files are infected, with a return code of 1:

Upload warning The file contains a virus! Details: 1 Retrieved from "http://festiva.bntbtc.com/wiki/Special:Upload"

Ideas?? Help?? Please!! I'm thinking maybe I need to add a variable on the end of the command string to specify the file, but I can't seem to figure it out --Pwgus 07:27, 13 October 2009 (UTC)

How do I Set Up the AntiVirus Protection?
The Manual: $wgAntivirusSetup and Manual:$wgAntivirus pages aren't easy to understand. I can find no information on the internet on setting up virus scanning other than those 2 pages. I managed to easily set up a wiki and changed several settings by adding and removing lines of code. I thought the AntiVirus setup would be the same procedure but I can't understand it.


 * 1) Is virus checking enabled by default?
 * 2) What virus checker does it use?
 * 3) Does it protect against Spyware, Malware, etc as well?
 * 4) How does the virus checker update its virus checking database?
 * 5) What happens when it detects a virus?


 * Hi, some questions are not really related to MediaWiki and are very dependant from what your environment looks like. So my answers will not fully satisfy you.
 * $wgAntivirusRequired is always enabled by default. So nothing is to do there. For virus checking to work you have to set $wgAntivirus to something not NULL and to set up $wgAntivirusSetup as described. Both is straight forward. For me the problem was to set up the virus checker on the server. I actually asked somebody to do this for me.
 * The one you set up with $wgAntivirusSetup, e.g. ClamAV or F-Prot.
 * This depends on the virus checker you use. However, I am not sure that you will ever try to upload Spyware or Malware.
 * Usually you set up a crontab to automate updates. This is different from system to system and form virus checker to virus checker.
 * The file does not get uploaded into MediaWiki.
 * Cheers --&#91;&#91;kgh&#93;&#93; 18:54, 23 August 2011 (UTC)