Enabling Antivirus Scanning for Uploaded Files

Available: DXP 7.3 SP 1+, Portal 7.3 GA7+, and DXP 7.2 FP 9+

note

This feature is not currently available on Portal 7.2 and earlier versions.

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. If a virus is found, it’s reported for users to reject.

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

Liferay integrates with the ClamAV Daemon (Clamd). For best performance, run Clamd on a separate server.

Here’s how to enable the antivirus scanning:

  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:

    dl.store.antivirus.enabled=true
    

    Docker environment variable:

    -e LIFERAY_DL_PERIOD_STORE_PERIOD_ANTIVIRUS_PERIOD_ENABLED=true
    
  3. Start your Liferay server.

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

  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, and you should decline saving the file.

Here's the virus detection message.

important

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

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy