SUNScholar/Curation/Virus Scan

BACK TO CURATION

Step 1
Install the "clamav-daemon" software by typing as follows. sudo apt-get install clamav-daemon

sudo freshclam

Step 2
Open the clamav config file by typing as follows: sudo nano /etc/clamav/clamd.conf

Copy and paste the following to the bottom of the file TCPAddr 127.0.0.1 TCPSocket 3310

Step 3
Then restart the clamav daemon by typing as follows. sudo service clamav-daemon restart

Step 1
Edit the following file and check that the parameters match the installation of clamav above. nano $HOME//dspace/config/modules/clamav.cfg See example below.
 * 1) --CLAMAV ANTI-VIRUS CONFIGURATIONS-#
 * 2) Configuration properties used solely by clamav curation task  #
 * 1) Configuration properties used solely by clamav curation task  #
 * 1) Configuration properties used solely by clamav curation task  #

service.host = 127.0.0.1
 * 1) Host address of ClamAV service (Unix daemon process on this host)

service.port = 3310
 * 1) The port the service listens on: 3310 is the standard port number for ClamAV

socket.timeout = 5000
 * 1) Initial timeout value (in milliseconds) used when the socket is connecting

scan.failfast = false
 * 1) Flag indicating whether a scan should stop when the first infected bitstream
 * 2) is detected within an item. Normally a complete scan is desired, so default
 * 3) value is false. But if items can contain large numbers of bitstreams, the
 * 4) display of the results can become unwieldy.

Step 2
Then edit the following file and make sure the "vscan" task is enabled using the ui.tasknames attribute: nano $HOME//dspace/config/modules/curate.cfg

See example below: ui.tasknames = \ profileformats = Profile Bitstream Formats, \ requiredmetadata = Check for Required Metadata, \ checklinks = Check Links in Metadata, \ vscan = Scan for viruses
 * 1) Friendly names for curation tasks to appear in admin UI
 * 2) Also acts as a filter - i.e. tasks not enumerated here can still
 * 3) be invoked on cmd line, etc - just not in UI

Enable Virus Scan During Item Submission (Optional)
Edit the following file: nano $HOME/dspace/config/modules/submission-curation.cfg Change virus-scan = false to virus-scan = true

Rebuild DSpace
Finally rebuild DSpace.