antivirus config

antivirus config

Changes the set of directories that will be scanned when performing malware/virus scans.

Example

kusanagi antivirus config --template wp-content kusanagi_html

Options

Template for directories to be scanned for malware/viruses (required)

--template {documentroot,drupal,wp-content,wp-uploads}

Specify the template of the directory to be scanned when searching for malware and viruses.
The target directories for each template are as follows

  • documentroot : /home/kusanagi/ {profile}/DocumentRoot/
  • drupal : /home/kusanagi/ {profile}/DocumentRoot/sites/
  • wp-content : /home/kusanagi/ {profile}/DocumentRoot/ {wp}/wp-content/
  • wp-uploads : /home/kusanagi/ {profile}/DocumentRoot/ {wp}/wp-content/uploads/

{profile} is replaced with the profile name you pass to the command.
{wp} {wp} is replaced with any WordPress sub‑directory that exists under that profile.
If multiple WordPress sites live inside the same profile, all of them are scanned.

Profile name

[profile]

Default: The current directory profile

If "profile" is specified, the scan‑target directories for that profile are updated.
However, if the current directory is not a profile, an error will occur.

Output

# kusanagi antivirus config --template wp-content kusanagi_html
antivirus completed.

Scan‑target configuration file

Note: This is an advanced setting. Change with caution.

The antivirus config command updates the scan targets for malware/virus detection. The configuration is stored in the file located at the following path:

  • /etc/opt/kusanagi/clamav/scan.yaml

Sample contents of scan.yaml:

target:
- /tmp/
- /var/tmp/
- /dev/shm/
include: []
include-dir: []
exclude: []
exclude-dir:
- /proc/
- /sys/
- /boot/efi/
- /usr/libexec/fwupd/efi/
- /usr/lib/firmware/
- /usr/share/fwupd/
- /var/opt/kusanagi/lib/clamav
---
kusanagi_html:
  target:
  - /home/kusanagi/kusanagi_html/DocumentRoot/wp-content/uploads

The settings are in yaml format, and each item is described below.

  • Top‑level items are global settings
    • target : target directory/file to be scanned
    • include: files to include (supports regular expressions)
    • include-dir: directories to include (supports regular expressions)
    • exclude: files to exclude (supports regular expressions)
    • exclude-dir: directories to exclude (supports regular expressions)
  • The profile name is set for each profile
    • target : target directory/file to be scanned

Every directory listed under "target" is scanned.
"include(-dir)" and "exclude(-dir)" further refine that set; if both match, exclude takes precedence.

KUSANAGI
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.