legacy-knowledge-base
公開されました Jul. 2, 2025

WindowsのLiferay PlatformでClamAVをセットアップする。

投稿者

Brian Larson

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

この記事は、テスト目的でWindows上のLiferayプラットフォームでClam Antivirusをセットアップする方法を文書化したものです。 文書がアップロードされる際に、ウイルススキャンを行うことを目的としています。

解像度

  1. ClamWin for Windowsのダウンロード. インストール後、より新しいバージョンにアップデートすることができます。 その他のOSの場合は、 http://www.clamav.net/をお試しください。
  2. ClamWinのインストーラーをデフォルトの設定で実行します。
  3. インストールが完了してデータベースが更新されたら、ディレクトリC:\ProgramData\.clamwin\db into C:\Program Files (x86)\ClamWin\bin\にコピーします。
  4. PATH変数を更新して、C:\Program Files (x86)\ClamWin\bin\を含めます。
  5. ファイルをスキャンして、ClamAVが正常に機能していることを確認する。 テスト用 eicar ファイル をダウンロードして実行します。 clamscan --stdout --no-summary [path to test file]. ファイルのダウンロードを許可するために、マシンのアンチウイルスを修正する必要がある可能性が高いです。

    このような出力が表示されるはずです:

    C:\Users\liferay>clamscan --stdout --no-summary C:\Users\liferay\Downloads\eicar.com.txt
    Loading virus signature database, please wait... done
    C:\Users\liferay\Downloads\eicar.com.txt: Eicar-Test-Signature FOUND
  6. ここで、Liferay プラットフォームの ClamAV の実装を設定します。 portal-ext.propertiesファイルに、以下のプロパティを追加します:
    # Set this property to true to enable execution of antivirus check when
    # files are submitted into a store. Setting this value to true will prevent
    # any potential virus files from entering the store but will not allow for
    # file quarantines.
    #
    dl.store.antivirus.enabled=true
    
    #
    # Set the name of a class that implements
    # com.liferay.portlet.documentlibrary.antivirus.AntivirusScanner. The
    # document library server will use this to scan documents for viruses.
    #
    #dl.store.antivirus.impl=com.liferay.portlet.documentlibrary.antivirus.DummyAntivirusScannerImpl
    dl.store.antivirus.impl=com.liferay.portlet.documentlibrary.antivirus.ClamAntivirusScannerImpl
  7. プラットフォームを起動し、管理者としてログインします。
  8. ページにドキュメントとメディアのポートレットを追加し、eicarファイルをアップロードします。

期待される結果

ドキュメントとメディアポートレットには、 Your request failed to complete and A virus was detected in fileとあります。

アップロードが正常にブロックされました。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base