5

I want to scan the files that are uploaded to my Azure blob. It looks like ClamAV (www.clamav.net) is probably the way to go. I see instructions on how to install on a Windows server, but what would my procedure be for a site hosted on Azure? I am using ASP.NET MVC.

Vince
  • 583
  • 5
  • 20

1 Answers1

2

Disclaimer: I haven't used ClamAV. Having said that...

You should be able to install it during a startup task (with elevated privileges). I looked at the ClamAV wiki, and it appears that the msi has a silent-install:

msiexec /i clamAV.msi /qr

You'll need to change that last parameter to /qn to force "no user interface."

The challenge will be scanning blobs. You'll need to copy files from their blobs to a local directory in your VM instance, and then run clamdscan on that file (basing off the wiki).

I haven't tried this, but the basic premise should hold up: Install anything requiring an MSI as a startup task (probably needs elevated mode).

David Makogon
  • 69,407
  • 21
  • 141
  • 189
  • Could one use cloud-drive to map to the storage account and scan that way? – Igorek Feb 25 '11 at 19:59
  • You can map a cloud drive. However, you can't overlay the cloud drive over other blobs. It would be its own blob with a vhd (and NTFS partition). You could then set up that Cloud Drive for on-demand scanning, but you'd still need to copy files into it, if people are uploading files to individual blobs. – David Makogon Feb 25 '11 at 20:25
  • I don't think I need to scan a blob, do I? I think I'm scanning a Stream InputStream of (HttpPostedFileBase object). Does that make things easier? – Vince Feb 25 '11 at 20:58
  • If you're pretty sure this is the right direction, do you have links on how to run command line and installers on Azure? Also, any links re the Cloud Drive / VHD / partition stuff? I know how to publish my ASP.NET project to Azure, but I don't know server-admin stuff for Azure. Thanks. – Vince Feb 27 '11 at 08:34