I'd like to do an automatic virus scan on any plugged in usb device using ClamAV. I'm using Ubuntu 12.04.
The closest thing I found was:
- Run clamav on mount of flashdrive
- How to run a shell script when a new USB storage device is detected?
The first one is not working for me and the second one seems to target a known device.
Is there a tutorial around I've missed? Or can I get some help with udev
rules that apply to any usb storage device added? Currently nothing seems to do anything.
This is an automated script. Just run it as root. You can change the command executed by editing
/usr/bin/doOnUSBinsert
.In
System
>Preferences
>Removable Drives and Media
there is a section to run automatically a program when USB is plugged.Here add the following command: