Enabling Antivirus Scanning for Uploaded Files

You can automatically scan any file uploaded to Liferay for viruses. When you enable the antivirus scanner, it checks files on upload to Liferay applications, such as Documents and Media, Message Boards, and more. Virus-infected files are reported for users to reject.

The scanner detects virus-infected files on upload to Documents and Media and other Liferay applications.

Liferay DXP 7.1 Fix Pack 20+ (and Service Pack 5+) integrates with the ClamAV Daemon (Clamd) running on a separate server.

Note: Prior to DXP 7.1 Fix Pack 20, the ClamAV antivirus scanner ran locally. Now DXP delegates antivirus scanning to a separate server.

Here’s how to enable the Clamd antivirus scanner:

  1. On a separate server, configure and start Clamd.

    Important: Load your ClamAV database before starting Clamd.

  2. Enable antivirus for your File Store (Document Library) by setting the following portal property or Docker Environment variable.

    Portal property:


    Environment variable:

  3. Start your DXP server.

  4. Go to Control PanelSystem Settings, and select Antivirus in the Security category.

    Antivirus is in the Security category in System Settings.

  5. Select Antivirus Clamd Scanner in the menu.

    Antivirus Clamd Scanner configuration

  6. Enter the Clamd server’s hostname or IP address, port, and a connection timeout time (milliseconds).

  7. Click Save.

Now files are scanned on upload to Liferay applications. If a virus is detected in a file you’re uploading, the scanner reports the infected file–decline saving the file.

Heres the virus detection message.

Important: Never save a virus-infected file. Reject the file by canceling the current operation.

« Java Virtual Machine TuningIntroduction to Securing Liferay DXP »
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0