Foren

Scanning virus in files during upload

venka reddy, geändert vor 9 Jahren.

Scanning virus in files during upload

Regular Member Beiträge: 231 Beitrittsdatum: 23.03.11 Neueste Beiträge
Hi ,

Whenever i am uploading the files, it should be scanned for virus. so i found the following properties in portal.properties

1.dl.store.antivirus.enabled=true
2.dl.store.antivirus.impl=com.liferay.portlet.documentlibrary.antivirus.ClamAntivirusScannerImpl.


So i have updated these properties in my portal-ext.properties. Then i tried to upload the files it throws an error "Unable to Scan the file" .

Is anything i am missing?
thumbnail
David H Nebinger, geändert vor 9 Jahren.

RE: Scanning virus in files during upload

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Did you install Clam AV?
venka reddy, geändert vor 9 Jahren.

RE: Scanning virus in files during upload

Regular Member Beiträge: 231 Beitrittsdatum: 23.03.11 Neueste Beiträge
No, will install and try it.
Nabil Bahtat, geändert vor 8 Jahren.

RE: Scanning virus in files during upload

New Member Beiträge: 13 Beitrittsdatum: 10.10.13 Neueste Beiträge
Hi,
When I uploadafile,I have this message "Unable to scan file for viruses".
I'm using Liferay 6.2 CE
I installed clamav and it works mannually with EICARE test file
I set these propertiesin portal-ext.properties
dl.store.antivirus.enabled=true
dl.store.antivirus.impl=com.liferay.portlet.documentlibrary.antivirus.ClamAntivirusScannerImpl

Thanks
Nabil
thumbnail
David H Nebinger, geändert vor 8 Jahren.

RE: Scanning virus in files during upload

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Check the logs for issues invoking clamav. might not be able to find it, might be a path issue, a permissions issue, ...
thumbnail
Kailash Yadav, geändert vor 8 Jahren.

RE: Scanning virus in files during upload

Regular Member Beiträge: 211 Beitrittsdatum: 18.10.11 Neueste Beiträge
If you don't find any useful information in Liferay's logs. check Clam's logs. Clam return following values after scan file:
0 : No virus found.
1 : Virus(es) found.
2 : An error occured.


If you are facing this issue on local env, you can debug ClamAntivirusScannerImpl.scan(File file) method