nextcloud / files_antivirus

👾 Antivirus app for Nextcloud Files
https://apps.nextcloud.com/apps/files_antivirus
GNU Affero General Public License v3.0
85 stars 36 forks source link

“Antivirus for files” - New rules not used by clamav-daemon #231

Closed Speed7811 closed 2 years ago

Speed7811 commented 2 years ago

Steps to reproduce

  1. Add new rule Match by: Scanner Ausgabe -> Match: /*Win.Test.EICAR_HDB-1* FOUND$/ -> Mark as: Ungeprüft
  2. Save this rule
  3. Upload EICAR Testfile

Expected behaviour

EICAR Testfile should be uploaded successfully

Actual behaviour

EICAR Testfile is blocked. If I restart the clamav daemon via “systemctl restart clamav-daemon” and upload the same EICAR Testfile the upload was successfully.

Server configuration

Operating system: Ubuntu 20.04.4

Web server: Apache 2.4.41

Database: Maria SQL Server 10.3.34

PHP version: 8.0.18

Nextcloud version: 23.0.4

Where did you install Nextcloud from: wget https://download.nextcloud.com/server/releases/latest.tar.bz2

List of activated apps: Enabled:

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.REMOVED.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "23.0.4.1",
        "overwrite.cli.url": "https:\/\/cloud.REMOVED.de",
        "overwritehost": "cloud.REMOVED.de:8443",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "default_language": "de",
        "default_locale": "de_DE",
        "enable_previews": true,
        "preview_max_x": "1024",
        "preview_max_y": "1024",
        "preview_max_scale_factor": "1",
        "jpeg_quality": "60",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "skeletondirectory": "",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 2,
        "logtimezone": "Europe\/Berlin",
        "log_rotate_size": 104857600,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "default_phone_region": "DE",
        "maintenance": false,
        "trashbin_retention_obligation": "7, 7"
    }
}

Client configuration

Browser: Opera

Operating system: Windows 10 Pro 21H2

Speed7811 commented 2 years ago

The issue is solved. When the service was restarted the first connect from the app to clamav daemon wasn't successful. That was the reason why I thought the rule was working. When the file was uploaded the second time the connection to the clamav daemon could be established and the scan was successful. No bug. Issue closed.