留言板

Scanning virus in files during upload

venka reddy,修改在9 年前。

Scanning virus in files during upload

Regular Member 帖子: 231 加入日期: 11-3-23 最近的帖子
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,修改在9 年前。

RE: Scanning virus in files during upload

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Did you install Clam AV?
venka reddy,修改在9 年前。

RE: Scanning virus in files during upload

Regular Member 帖子: 231 加入日期: 11-3-23 最近的帖子
No, will install and try it.
Nabil Bahtat,修改在8 年前。

RE: Scanning virus in files during upload

New Member 帖子: 13 加入日期: 13-10-10 最近的帖子
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,修改在8 年前。

RE: Scanning virus in files during upload

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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,修改在8 年前。

RE: Scanning virus in files during upload

Regular Member 帖子: 211 加入日期: 11-10-18 最近的帖子
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