Issue
- I'd like to have the DXP functionality described at https://learn.liferay.com/dxp/latest/en/system-administration/file-storage/enabling-antivirus-scanning-for-uploaded-files.html in my Liferay PaaS environment. How can I achieve that? Do I have to do anything, or is this provided by default in a Liferay PaaS environment?
Environment
- Liferay PaaS
Resolution
- Liferay PaaS environments do have a certain kind of antivirus in the background (at the at the cluster infrastructure level), as mentioned at https://learn.liferay.com/liferay-cloud/latest/en/reference/liferay-cloud-infrastructure.html:
Antivirus
Liferay Cloud automatically detects trojans, viruses, malware, and other malicious threats, usingClamAV. This engine operates as a background service within the cloud, and it is not accessible to users or other services. Each cluster in Liferay Cloud has one instance of the antivirus running.
- however, this does not scan files uploaded to Documents and Media, it is not equivalent to the functionality described at https://learn.liferay.com/dxp/latest/en/system-administration/file-storage/enabling-antivirus-scanning-for-uploaded-files.html, and Liferay PaaS customer do not have any control over it.
- Therefore, if you'd like to achieve that functionality in Liferay PaaS, you will need to run a ClamAV (custom) service in your cloud environment, which would run next to the built-in services (Liferay, database, webserver, etc.) in your Liferay PaaS stack. And then you can employ the solution described in https://learn.liferay.com/dxp/latest/en/system-administration/file-storage/enabling-antivirus-scanning-for-uploaded-files.html by accordingly pointing to the host and port of that ClamAV (custom) service.