Closed (won't fix)
Project:
ClamAV
Version:
7.x-1.0-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2012 at 20:01 UTC
Updated:
12 Apr 2015 at 21:50 UTC
Jump to comment: Most recent
Comments
Comment #1
manarth commentedHmm, that sounds like the output stream (php to ClamAV) is failing intermittently. If that happened, I'd expect the scan to go unchecked, and to see an error in Watchdog, reporting
'Uploaded file %filename could not be scanned. Clamscan reported:<br />@error_string'. Can you see any other ClamAV errors in Drupal (or in ClamAV's own logs)?Comment #2
yurg commentedNo, no error messages in Drupal Watchdog since. Issue was probably caused by user's attempt to upload relatively big file (~60Mb).
Comment #3
yurg commentedHello again,
I was able to reproduce same issue on test server (uploading ~70Mb .ZIP-file) and Watchdog logs were captured. So, in order of appearance:
Think it may be caused by filesizes and/or length the queue of pending connections at clamd.conf:
MaxScanSize = "104857600"
MaxFileSize = "26214400"
MaxConnectionQueueLength 30
I'll try to increase above values and see how it works. Just in case if issue caused by clamav restrictions: would it be possible to print some kind of "clamav scanning filesize restrictions was reached") to Watchdog?
Thank you.
br,
yg
Comment #4
yurg commentedUpdate: indeed changing StreamMaxLength parameter in /etc/clamav/clamd.conf from default 25M to 250M did the trick. Issue closed.
Comment #5
yurg commentedHello,
Spoke too soon unfortunately: after upgrading nginx to most recent version plus adding FileField Nginx Progress module&dependencies ( http://drupal.org/project/filefield_nginx_progress ) same error appears again along with
ERROR: INSTREAM: Can't write to temporary file.notice in clamav.log./tmp folder permissions were checked and path to /tmp folder was manually added to clamd.conf, as well as StreamMaxLength increased up to 450M but all these changes made no difference at all, error still there. I made some experience and discovered that 50Mb file was scanned successfully while 90Mb file scan was failed. So I think that may be there is some kind of file size restrictions in clamav configs or module I just can't find still. Google search brought no results so far. But I found this issue: http://drupal.org/node/1571596 which may (or may not) be connected with instream error mentioned in clamav.log.
So, walking in circles for days, I'd appreciate any advice. Thank you!
Comment #6
calebtr commentedIs the _clamav_scan_via_daemon() issue separate from the nginx "INSTREAM: Can't write to temporary file" issue?
I had the first issue, _clamav_scan_via_daemon(), and changing StreamMaxLength in clamav.conf to match my maximum in PHP/Drupal did the trick, after restarting clamd.
Comment #7
adammaloneClosing this because it's both an old issue and seems to be covered in scope within other issues.