Skip to content
created by Aha00aAha00a at 2025-08-05
last modified by Aha00aAha00a at 2026-02-25
revision: 6

ClamAv

Software Application

ClamAV® is an open-source antivirus engine for detecting trojans, viruses, malware & other malicious threats.

세상에.. 보안점검 중 보안프로그램 운영에 대해 LinuxAntivirus Software에 관한 자료가 미흡하다 하여 설치해봄. --2025-08-05

1. Installation

sudo apt-get install clamav

2. Version

clamscan --version
ClamAV 1.4.3/27723/Tue Aug  5 17:36:10 2025

3. Update

sudo freshclam

3.1. Troubleshooting

3.1.1. Insufficient Memory

Testing database: '/var/lib/clamav/tmp.628c5/clamav-a8e48a60b669aa6a0211c18d734f61be.tmp-daily.cld'     ...
ERROR: Database load killed by signal 9
ERROR: Database test FAILED.
ERROR: Unexpected error when attempting to update database: daily
WARNING: fc_update_databases: fc_update_database failed: Test failed (8)
ERROR: Database update process failed: Test failed (8)
ERROR: Update failed.

답이 없다. 1.5GB 이상의 램이 필요하다. 깔끔하게 포기한다. --2025-08-05

3.1.2. Lock File

ERROR: Failed to lock the log file /var/log/clamav/freshclam.log: Resource temporarily unavailable
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
sudo systemctl stop clamav-freshclam.service
sudo freshclam
sudo systemctl start clamav-freshclam.service

--2025-08-05

4. Scan

sudo clamscan -r /
sudo clamscan -r /var/www
sudo clamscan --exclude=".npm" --exclude="temp" -r /home/ubuntu/
/home/ubuntu/.sudo_as_admin_successful: Empty file
/home/ubuntu/.bash_history: OK

----------- SCAN SUMMARY -----------
Known viruses: 8708154
Engine version: 1.4.3
Scanned directories: 32431
Scanned files: 178707
Infected files: 0
Data scanned: 2306.23 MB
Data read: 38300.12 MB (ratio 0.06:1)
Time: 843.668 sec (14 m 3 s)
Start Date: 2025:08:05 18:13:13
End Date:   2025:08:05 18:27:17
sudo nice -n 19 clamscan -r / \
--infected \
--log=/root/clamav_scan.log \
--exclude-dir="^/proc" \
--exclude-dir="^/sys" \
--exclude-dir="^/dev" \
--exclude-dir="^/run" \
--exclude-dir="^/var/log" \
--exclude-dir="^/var/cache" \
--exclude-dir="^/usr/share" \
--exclude-dir="^/snap" \
--exclude-dir="^/mnt" \
--exclude-dir="^/media" \
--exclude=".npm" \
--exclude="node_modules" \
--exclude=".git"

5. See Also

5.2. Adjacent Pages

Control
≤ 32
all
1.0x
1.0x
80
-120
ON
Metrics
Nodes(visible/total)0/0
Links(visible/total)0/0
Avg degree0.00
Depth coverage0
Queue(fetch/graph)0 / 0
Zoom(scale)1.00x
Ctrl/⌘ + Scroll: Zoom
Root 1-hop 2-hop+