Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] ClamAV

Featured Replies

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.

  • Replies 336
  • Views 113.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • You would make another instance of the container.  Each instance scans whatever is specified

  • chmod -R u-x,go-rwx,go+u,ugo+X /mnt/cache/appdata/clamav chown -R nobody:users  /mnt/cache/appdata/clamav

Posted Images

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?

 

SafariScreenSnapz005.thumb.jpg.6a49e4e98af69ddf54e62cd3e378dcde.jpg

 

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 by wgstarks
add screenshot

39 minutes ago, wgstarks said:

Is it just a space to separate multiple configurations?

 

SafariScreenSnapz005.thumb.jpg.6a49e4e98af69ddf54e62cd3e378dcde.jpg

 

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)

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.

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. 

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 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

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.

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. 

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?

 

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. 

  • 3 weeks later...

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 ?

 

  • 3 weeks later...
  • Author

Update.

 

I have updated to 0.103.2-r0 and merged a couple of PRs.

For my scan today, the `LibClamAV` issue seems resolved.

 

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

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.

@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.

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)

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

The default if you didn't change it scans /mnt/user, so all your shares

  • 1 month later...

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).'');

?>

 

  • Author
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

  • 1 month later...

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

45 minutes ago, Squid said:

Where are you adding this?

advanced view> extra parameters

 

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.