hege wrote:
No kares, you are right, good catch. It's has to be the small ramdisk size. The error clearly shows it's being used as ClamAV temporary directory, thus there is no space to unpack stuff. You must have some other TEMPDIR directory set. SCANTEMPFILE is different thing.
So the "fix" here is TEMPDIR to another bigger disk. Using ramdisk is not strictly necessary anyway, it's very marginal performance gain. Unless you are very low on memory and OS doesn't cache files.
Hi hege,
I increased the RAM disk size to 64 MB, with some interesting results:
Code:
# mount | grep ram0
/dev/ram0 on /mnt/memory type ext3 (rw,mand)
# df -h | grep ram0
/dev/ram0 61M 5.3M 53M 10% /mnt/memory
# sudo -u clamav clamscan --tempdir=/mnt/memory
/root/.htoprc: OK
/root/dead.letter: OK
/root/.fonts.conf: OK
/root/.joe_state: Access denied
/root/memtest86-3.5.tar.gz: OK
/root/.mysql_history: Access denied
/root/.serverauth.1606: Access denied
/root/.bash_history: OK
/root/.qmake.vars: OK
/root/clamava.debug: OK
/root/.lesshst: Access denied
/root/.Xauthority: Access denied
/root/.mcoprc: Access denied
/root/.kderc: Access denied
/root/.ICEauthority: Empty file
/root/.xinitrc: OK
/root/du.sh~: OK
/root/du.sh: OK
/root/.serverauth.5416: Access denied
/root/.nvidia-settings-rc: OK
/root/findlargefiles: OK
----------- SCAN SUMMARY -----------
Known viruses: 608668
Engine version: 0.95.2
Scanned directories: 1
Scanned files: 12
Infected files: 0
Data scanned: 3.27 MB
Data read: 0.95 MB (ratio 3.46:1)
Time: 10.086 sec (0 m 10 s)
So clamscan now has enough space and "clamscan --tempdir=/mnt/memory" works.
But the error still persists when I run HAVP:
Code:
# /usr/local/sbin/havp -c /usr/local/etc/havp/havp.config
Starting HAVP Version: 0.91
LibClamAV Error: cli_cvdload(): Can't create temporary directory /mnt/memory/clamav-049b6f9156bc66262b0a9587851194e2
LibClamAV Error: Can't load /usr/share/clamav/main.cvd: Can't create temporary directory
One or more scanners failed to initialize!
Check errorlog for errors.
Exiting..
# tail -f /var/log/havp/error.log
14/08/2009 05:46:19 === Starting HAVP Version: 0.91
14/08/2009 05:46:19 Running as user: havp, group: havp
14/08/2009 05:46:19 Use parent proxy: 192.168.1.101:3128
14/08/2009 05:46:19 --- Initializing ClamAV Library Scanner
14/08/2009 05:46:19 ClamAV: Using database directory: /usr/share/clamav
14/08/2009 05:46:20 ClamAV: Could not load database: Can't create temporary directory
14/08/2009 05:46:20 Error initializing ClamAV Library Scanner!
Someone in #Clamav on Freenode suggested "64 MB might be cutting it close depending on what you're scanning too."
Which made sense, but since HAVP's MAXSCANSIZE was set to 15000000 (14 MB), I thought that HAVP (clamscan) would never need more than 14-20MB of TEMPDIR space.
Am I incorrect in assuming this?
karesmakro has said above that he uses an 8MB RAMdisk and HAVP works fine
Do you still think it is an issue of free space in TEMPDIR?