legacy-knowledge-base
公開されました Jun. 30, 2025

Enabling real-time antivirus scanning without asynchronous background scans

written-by

Peter Schwarcz

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

We would like to enable real-time antivirus scanning for uploaded files but disable asynchronous background scanning of the document library. The issue arises because:

  • Enabling dl.store.antivirus.enabled=true triggers both real-time scanning and background scanning of the document library.
  • Disabling dl.store.antivirus.enabled=false stops the real-time scanning on uploads but prevents background scans entirely.

Environment

  • 2024.Q3.2

Resolution

Currently, Liferay does not provide an out-of-the-box (OOTB) option to completely disable the asynchronous background scan while keeping real-time upload scanning enabled. However, you can use the following workaround and set a long interval for background scans:

  • Navigate to Control Panel > System Settings > Antivirus > Asynchronous Antivirus Configuration, and set the Batch Scan Cron Expression to an extremely long interval, such as:
    0 0 1 1 * ? 2099
    This schedules the background scan to run once on January 1, 2099.

  • Enable Real-Time Scanning:
    Set dl.store.antivirus.enabled to true in order to maintain real-time scanning of uploaded files.

  • Test and Monitor:
    Test the configuration in a non-production environment and monitor the logs to confirm no unexpected issues arise.
did-this-article-resolve-your-issue

legacy-knowledge-base