FileCloud supports scanning of uploaded files using ClamAV (an opensource antivirus software).
It is possible to use the OpenSource Free ClamAV antivirus to scan uploaded files automatically. ClamAV is available for Windows and Linux.
The instructions are for Ubuntu Linux only, but can be used for other Linux systems using equivalent commands
Note: ClamWin features include on-demand (user started) scanning, automatic updates, scan scheduling, context menu integration to Explorer, and an add-in for Microsoft Outlook . ClamWin does not provide on-access scanning, additional software must be used.
When an incoming file is detected to have virus, the following steps will happen:
- Incoming file will be deleted
- An alert will be thrown in the admin UI
- A toast will be thrown in the user UI
- An entry will be added in audit reflecting the fact that file with virus is found and deleted.
Installing ClamAV in Ubuntu
Install the ClamAV package
You might need to run 'freshclam' to update the antivirus database files
- Update the ClamAV-Daemon mode to use TCP, by running the sudo dpkg-reconfigure clamav-base
In the reconfigure wizard, choose Socket Type TCP and Interface as localhost to listen to.
After reconfigure finishes, verify the clamd.conf file is setup correctly (/etc/clamav/clamd.conf)
NOTE: TCPAddr localhost may not work. You can enter the filecloud URL in place of TCPAddr to make it work
Additional commands for Ubuntu 16
Installing ClamAV in Windows
- Download and Install ClamWin Free Antivirus. Use this path when installing: C:\ClamAV\ClamWin
- Download ClamAV for Windows from this link http://oss.netfarm.it/clamav/. Download the Win64 build (it will be something like clamav-amd64-<someversion>.7z).
- To extract the downloaded .7z file, Use 7z extractor from http://www.7-zip.org/download.html .
- Extract the clamav-amd64-<someversion>.7z file to C:\ClamAV location. All the files must be extracted and saved in C:\ClamAV location
*Note: After extracting it, make sure that the files clamd.exe are in c:\ClamAV (If it extracted it inside a subfolder, move all the files from that subfolder back in to c:\ClamAV). Mandatory Step
Create these extra folders:
Modify the Antivirus Database download folder in ClamWin Free Antivirus to point it to C:\ClamAV\db and update the DB.
Open C:\ClamAV\ClamWin\bin and run ClamWin Application.
Tap on Tools -> Preference -> File Locations
Now change the location of Virus database to C:\ClamAV\db and save.
You’ll need the Windows Server 2003 Resource kit (It works on 2012 R2). Get it here : http://www.microsoft.com/en-us/download/confirmation.aspx?id=17657 and copy / move instsrv.exe and srvany.exe in the same directory of ClamAV (C:\ClamAV).
Goto DOS prompt (cmd) with elevated rights and go to C:\ClamAV. Enter: instsrv.exe ClamD c:\ClamAV\srvany.exe
Now edit the registry to let clamd.exe run using it’s clamd.conf file when started as a service.
NOTE: It is dangerous to edit the registry, follow carefully
§ Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ClamD
§ Right click on Clamd and create a new Key called Parameters
§ Right click on Parameters and create a new String Value called Application
§ Edit the new Application REG_SZ and add c:\ClamAV\clamd.exe -c c:\ClamAV\clamd.conf
§ Right click on CalmD and create a new String Value called Description
§ Edit the new Description REG_SZ and add ClamAV Antivirus For FileCloud
Then you can start and stop ClamD in Services or manually:
net start ClamD
You can check if clamav is listening at the right port:
netstat -a | findstr 3310
Follow the FileCloud instructions to connect to the hostname of the local machine.
Integrating ClamAV with FileCloud
Once the ClamAV is setup and started, The next step is to add details of the ClamAV service to FileCloud server
- Log into FileCloud Administration Portal
- Click on Settings in the left navigation panel
- Click on Misc -> Anti-Virus tab
- Enable ClamAV Scan
- Enter the following information
|Enable ClamAV Scan||Check this setting to enable AV scanning|
Enter the URL or IP of the system where Clam AV is running. This can be local or remote system.
|ClamAV Port||The port used by ClamAV (This is set when ClamAV is installed in the previous section)|
|Skip scanning for files greater than||This is the file limit in bytes that will be scanned. For example, very large files can be excluded from scanning. default value 25MB|
|Stream Chunk Size||This is a advanced setting used to stream the file content to AV server for scanning. Default is 8k.|