Error 127 is likely a "command not found" (either the clamav or a
suitable shell to run it under). Error code 126 may be an
"insufficient permission" type of error (see
https://moodle.org/mod/forum/discuss.php?d=114926).

Try the steps listed in the last message at:

http://www.gossamer-threads.com/lists/wiki/mediawiki/207889

which appears to discuss almost exactly the same issue you describe.

On 10 October 2012 10:15, John Horne <[email protected]> wrote:
> Hello,
>
> I am running Mediawiki 1.19.2 on a CentOS 6.3 box, and have installed
> the ClamAV 0.97.6 package (using yum). I have also set $wgAntivirus to
> 'clamav' in my LocalSettings.php file.
>
> However, when trying to upload an image this gave me an error code of
> 127. (Checking the image locally it passes clamav with no problem.)
>
> I then modified $wgAntivirusSetup to use the absolute pathname to
> 'clamscan'. This now gives me a 126 error code.
>
> I am now a bit stuck. Not too sure what the problem is. The debug log
> shows:
>
> ==============
> UploadBase::detectVirus: running virus scan: /usr/bin/clamscan
> --no-summary '/tmp/phpa5rFd7'
> wfShellExec: /bin/bash '/var/www/html/mediawiki/bin/ulimit4.sh' 180
> 102400 102400 '/usr/bin/clamscan --no-summary '\''/tmp/phpa5rFd7'\''
> 2>&1'
> UploadBase::detectVirus: failed to scan /tmp/phpa5rFd7 (code 126).
> ==============
>
> So 'clamscan' seems to run okay via mediawiki, but fails for some
> reason. Anyone any ideas? I have been trying to find what the 126 error
> code actually means, but ClamAV doesn't seem to provide a list of error
> codes anywhere.
>
>
>
> Thanks,
>
> John.
>
> --
> John Horne                   Tel: +44 (0)1752 587287
> Plymouth University, UK      Fax: +44 (0)1752 587001
>
> _______________________________________________
> MediaWiki-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



-- 
Dave Humphrey -- [email protected]
Founder/Server Admin of the Unofficial Elder Scrolls Pages -- www.uesp.net

_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to