wgstarks Posted March 11, 2021 Share Posted March 11, 2021 4 hours ago, pokerchip said: No, the default for clamscan is 25mb. So if you want clamscan to scan your files that are smaller than 4000M, then you want to set the config to what I said. Also, clamscan has a hard limit of 4000M. If you want a workaround, you will need to chunk your files before clamscan reads them. If I do that it’s likely that Plex won’t be able to play the files. I’ll need to investigate other alternatives that aren’t so limited. Quote Link to comment
wgstarks Posted March 11, 2021 Share Posted March 11, 2021 (edited) 10 hours ago, pokerchip said: You would configure this in the post arguments section of advanced settings of ClamAV. Check options here: https://www.clamav.net/documents/scanning#clamscan If you want more details: https://linux.die.net/man/1/clamscan Is it just a space to separate multiple configurations? Realized that i had the arguments in the wrong field after taking the screenshot. Already fixed. Just want to be sure they are correctly formatted? Edited March 11, 2021 by wgstarks add screenshot Quote Link to comment
pokerchip Posted March 11, 2021 Share Posted March 11, 2021 39 minutes ago, wgstarks said: Is it just a space to separate multiple configurations? Realized that i had the arguments in the wrong field after taking the screenshot. Already fixed. Just want to be sure they are correctly formatted? Yep, space delimited. Your ss looks good to me. (Since you moved it to post arguments) Quote Link to comment
wgstarks Posted March 11, 2021 Share Posted March 11, 2021 1 hour ago, pokerchip said: Yep, space delimited. Your ss looks good to me. (Since you moved it to post arguments) Thanks for the help with this. Still seeing a lot of these errors though- LibClamAV Warning: fmap: failed to get MD5 LibClamAV Error: CRITICAL: fmap() failed /scan/Torrents/Monty Python and the Holy Grail (1975)/Monty Python and the Holy Grail (1975).Remux-1080p Proper.-decibeL.mkv: Can't allocate memory ERROR As far as I can see, all the errors are for files that are well above the 4000MB limit. It’s my understanding that these files should ignored. Quote Link to comment
pokerchip Posted March 11, 2021 Share Posted March 11, 2021 27 minutes ago, wgstarks said: Thanks for the help with this. Still seeing a lot of these errors though- LibClamAV Warning: fmap: failed to get MD5 LibClamAV Error: CRITICAL: fmap() failed /scan/Torrents/Monty Python and the Holy Grail (1975)/Monty Python and the Holy Grail (1975).Remux-1080p Proper.-decibeL.mkv: Can't allocate memory ERROR As far as I can see, all the errors are for files that are well above the 4000MB limit. It’s my understanding that these files should ignored. You are right. I get the same error too if I try to scan files larger than 4gb. Hence why I linked the source code of LibClamAV. I think there is a bug where it tries to read file descriptor, but in the process it also tries to allocate memory leading to fmap errors due to hitting 4000M limit. This is just based on a quick read through of their c header files, but I haven’t coded c for years, so I might be completely wrong. Also, Cisco doesn’t seem to respond to “issues” on github. If anyone else has insights, please share. I am curious how @Squid utilizes this. Quote Link to comment
Squid Posted March 11, 2021 Share Posted March 11, 2021 Never noticed. But, any/all files I've got that are over 4GB would be media files, and I'm not too worried about anything infecting them since it would simply cause display corruption. I do worry about executable files, and if they're over 4GB in size then there's obviously something very wrong with how they're programmed. 1 Quote Link to comment
wgstarks Posted March 11, 2021 Share Posted March 11, 2021 1 hour ago, Squid said: I do worry about executable files, and if they're over 4GB in size then there's obviously something very wrong with how they're programmed. If that’s the case there isn’t much point in me scanning my server. It’s pretty much nothing but video and audio files with associated artwork. Thanks Quote Link to comment
Aceriz Posted March 11, 2021 Share Posted March 11, 2021 Hey all, I am running a clamav daemon the one from mk0x/docker-clamav:alpine. .. setup for nextcloud antivirus... I keep getting error below in the logs. [bootstrap] Initial clam DB download. Thu Mar 11 17:44:55 2021 -> ClamAV update process started at Thu Mar 11 17:44:55 2021 Thu Mar 11 17:44:55 2021 -> daily database available for download (remote version: 26105) Thu Mar 11 17:44:55 2021 -> ^downloadFile: Unexpected response (429) from https://database.clamav.net/daily.cvd Thu Mar 11 17:44:55 2021 -> ^getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd Thu Mar 11 17:44:55 2021 -> Trying again in 5 secs... Thu Mar 11 17:45:00 2021 -> daily database available for download (remote version: 26105) Thu Mar 11 17:45:00 2021 -> daily database available for download (remote version: 26105) Thu Mar 11 17:45:00 2021 -> ^downloadFile: Unexpected response (429) from https://database.clamav.net/daily.cvd Thu Mar 11 17:45:00 2021 -> ^getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd Thu Mar 11 17:45:00 2021 -> Trying again in 5 secs... Thu Mar 11 17:45:05 2021 -> daily database available for download (remote version: 26105) Thu Mar 11 17:45:05 2021 -> !downloadFile: Unexpected response (429) from https://database.clamav.net/daily.cvd Thu Mar 11 17:45:05 2021 -> !getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd Thu Mar 11 17:45:05 2021 -> Giving up on https://database.clamav.net... Thu Mar 11 17:45:05 2021 -> !Update failed for database: daily Thu Mar 11 17:45:05 2021 -> ^fc_update_databases: fc_update_database failed: HTTP GET failed (11) Thu Mar 11 17:45:05 2021 -> !Database update process failed: HTTP GET failed (11) Thu Mar 11 17:45:05 2021 -> !Update failed. Quote Link to comment
pokerchip Posted March 11, 2021 Share Posted March 11, 2021 3 hours ago, Aceriz said: Hey all, I am running a clamav daemon the one from mk0x/docker-clamav:alpine. .. setup for nextcloud antivirus... I keep getting error below in the logs. [bootstrap] Initial clam DB download. Thu Mar 11 17:44:55 2021 -> ClamAV update process started at Thu Mar 11 17:44:55 2021 Thu Mar 11 17:44:55 2021 -> daily database available for download (remote version: 26105) Thu Mar 11 17:44:55 2021 -> ^downloadFile: Unexpected response (429) from https://database.clamav.net/daily.cvd Thu Mar 11 17:44:55 2021 -> ^getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd Thu Mar 11 17:44:55 2021 -> Trying again in 5 secs... Thu Mar 11 17:45:00 2021 -> daily database available for download (remote version: 26105) Thu Mar 11 17:45:00 2021 -> daily database available for download (remote version: 26105) Thu Mar 11 17:45:00 2021 -> ^downloadFile: Unexpected response (429) from https://database.clamav.net/daily.cvd Thu Mar 11 17:45:00 2021 -> ^getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd Thu Mar 11 17:45:00 2021 -> Trying again in 5 secs... Thu Mar 11 17:45:05 2021 -> daily database available for download (remote version: 26105) Thu Mar 11 17:45:05 2021 -> !downloadFile: Unexpected response (429) from https://database.clamav.net/daily.cvd Thu Mar 11 17:45:05 2021 -> !getcvd: Can't download daily.cvd from https://database.clamav.net/daily.cvd Thu Mar 11 17:45:05 2021 -> Giving up on https://database.clamav.net... Thu Mar 11 17:45:05 2021 -> !Update failed for database: daily Thu Mar 11 17:45:05 2021 -> ^fc_update_databases: fc_update_database failed: HTTP GET failed (11) Thu Mar 11 17:45:05 2021 -> !Database update process failed: HTTP GET failed (11) Thu Mar 11 17:45:05 2021 -> !Update failed. HTTP status code 429 represents too many requests. Database server may be rate limiting your public IP. Quote Link to comment
Aceriz Posted March 11, 2021 Share Posted March 11, 2021 2 minutes ago, pokerchip said: HTTP status code 429 represents too many requests. Database server may be rate limiting your public IP. oh... okay so if I just leave it off for like a day or two it might work again? Quote Link to comment
pokerchip Posted March 11, 2021 Share Posted March 11, 2021 Just now, Aceriz said: oh... okay so if I just leave it off for like a day or two it might work again? That’s the hope. Considering this is a daily database, one day sounds about right. Quote Link to comment
jmlm Posted April 1, 2021 Share Posted April 1, 2021 Hi, Got the error : LibClamAV Warning: fmap: map header allocation failed LibClamAV Error: CRITICAL: fmap() failed Tried the parameters : --max-filesize=4000M --max-scansize=4000M The errors are always present and the scan take a long long long time !!!! is there a way to completly exclude files which are too big (not by name or something else) or to resolve the problem ? Quote Link to comment
TQ Posted April 17, 2021 Author Share Posted April 17, 2021 Update. I have updated to 0.103.2-r0 and merged a couple of PRs. For my scan today, the `LibClamAV` issue seems resolved. Quote Link to comment
SmokeyColes Posted April 18, 2021 Share Posted April 18, 2021 Hi I have installed ClamAV on my system for virus protection. Is there a webUI or VNC screen for it? How do you use and configure it? Thanks Chris Quote Link to comment
Squid Posted April 18, 2021 Share Posted April 18, 2021 37 minutes ago, SmokeyColes said: Hi I have installed ClamAV on my system for virus protection. Is there a webUI or VNC screen for it? How do you use and configure it? Thanks Chris No. There's a script in the OP you can run on a schedule to have the app scan you system and notify you about any issues. Quote Link to comment
SmokeyColes Posted April 18, 2021 Share Posted April 18, 2021 @squid - Squid thanks for that, I can see some of the early on posts for the script. Is there like a tutorial or step by step (for dummies) guide for newbs on how to get it all working..? I'm keen on automated scans in the background once a week and a notification. Quote Link to comment
Squid Posted April 18, 2021 Share Posted April 18, 2021 Add that script to the user scripts plugin. Set it to run on a schedule of your choice. And also set ClamAV to not autostart (doesn't hurt, but not necessary) Quote Link to comment
SmokeyColes Posted April 18, 2021 Share Posted April 18, 2021 1 hour ago, Squid said: Add that script to the user scripts plugin. Set it to run on a schedule of your choice. And also set ClamAV to not autostart (doesn't hurt, but not necessary) Great thank you, "Antivirus Scan Started" and the schedule is set in User Scripts. I am a little confused - what is it actually scanning? Every disk in the array or just dockers? Once it finds a file, does it inform you and does it treat it? Thanks Chris Quote Link to comment
Squid Posted April 18, 2021 Share Posted April 18, 2021 The default if you didn't change it scans /mnt/user, so all your shares 1 Quote Link to comment
vroommm Posted May 18, 2021 Share Posted May 18, 2021 Thanks for the superb script and tool. Makes me feel much better about my data and set up. I made a minor adjustment to the script to change the $notify type in case there are infected files found the allowable values are normal|warning|alert for a green amber or red notification respectively... it might help somebody... #!/usr/bin/php <? $notify="normal"; exec('/usr/local/emhttp/plugins/dynamix/scripts/notify -e "Antivirus Scan Started" -s "Antivirus Scan" -d "Antivirus Scan Started" -i '.escapeshellarg($notify).''); exec('docker start ClamAV'); for ( ;; ) { $status = trim(exec("docker ps | grep ClamAV")); if ( ! $status ) break; sleep(60); } exec("docker logs ClamAV 2>/dev/null",$logs); foreach ($logs as $line) { $virus = explode(" ",$line); if (trim(end($virus)) == "FOUND" ) { $infected .= "$line\n"; $notify="warning"; } } if ( ! $infected ) { $infected = "No infections found\n"; } exec('/usr/local/emhttp/plugins/dynamix/scripts/notify -e "Antivirus Scan Finished" -s "Antivirus Scan" -d '.escapeshellarg($infected).' -i '.escapeshellarg($notify).''); ?> 1 Quote Link to comment
TQ Posted May 22, 2021 Author Share Posted May 22, 2021 On 5/18/2021 at 12:05 PM, vroommm said: Thanks for the superb script and tool. Makes me feel much better about my data and set up. I made a minor adjustment to the script to change the $notify type in case there are infected files found the allowable values are normal|warning|alert for a green amber or red notification respectively... it might help somebody.. Thanks @vroommm Quote Link to comment
luca2 Posted July 19, 2021 Share Posted July 19, 2021 Hi, thx for the docker! I tri3ed -after install- to add: --max-scansize=4000N --max-filesize=4000N but as soon as I press save, the docker disappears. Anyone expiriencieng the same? Rgds Quote Link to comment
Squid Posted July 19, 2021 Share Posted July 19, 2021 Where are you adding this? Quote Link to comment
luca2 Posted July 19, 2021 Share Posted July 19, 2021 45 minutes ago, Squid said: Where are you adding this? advanced view> extra parameters Quote Link to comment
Squid Posted July 19, 2021 Share Posted July 19, 2021 It looks like you'd want that in Post Arguments instead Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.