We have Moodle 2.3.2+ and the same problem, meaning that we are not able to ulpoad any type of file on the platform if we use ClamAV.
What was your solution?
Or someone else has an answer for our problem?
All the best,
Since neither has mentioned any details concerning platform (assuming Linux), if remotely hosted (assuming not), and how ClamAV was installed (package manager or compiled) the following is just a thought/suggestion as to what to check.
From experience with installing ClamAV on Linux, it has to run under a 'clamav' user. Could be all one needs to do is make that user part of the group for Apache. The issue being where Moodle/clamav first stores the file to scan it and then pass it back to Moodle (or something like that). Moodle runs under apache user/group and ClamAV runs under 'clamav' user/group.
There is a YouTube Video in spanish? - no audio for me:
'spirit of sharing', Ken
Follow up to posting .... did some testing ...
Check your path to the clamscan exec. If it is correct there will be a 'green' check mark beside the path given after saving. If it is in-correct and one has terminal access to server as user:
should return the path.
Check your php.ini (php info) for any value for: upload_tmp_dir
If there isn't one that's ok, it just means php will probably use the operating system temp directory. Tested that and the uploaded file was sent to operating system temp where clamscan did scan it.
Settings for On clam AV failure says:
"If you have configured clam to scan uploaded files, but it is configured incorrectly or fails to run for some unknown reason, how should it behave? If you choose 'Treat files like viruses', they'll be moved into the quarantine area, or deleted. If you choose 'Treat files as OK', the files will be moved to the destination directory like normal. Either way, admins will be alerted that clam has failed. If you choose 'Treat files like viruses' and for some reason clam fails to run (usually because you have entered an invalid pathtoclam), ALL files that are uploaded will be moved to the given quarantine area, or deleted. Be careful with this setting."
When clamscan fails, there is an IM message set to admin user.
"Clam AV has failed to run. The return error message was There was an unknown error with clam.. Here is the output from Clam:"
In above example there was not error returned to Moodle to report.
'spirit of sharing', Ken
Thank you for your answer. The mistake was that our path to the clamscan exec wasn't correct.
Thank you again for your support,