Bill Landry wrote:
> In a default configure (simply "./configure" without any config options
> set) and build of clamav, what temporary directory does clamav use by
> default - that is, the temporary directory that can be overridden with
> the following clamscan flag?:
>
Poking around in the code again and see that clamscan use P_tmpdir to
find the default temporary directory and at least in Solaris that is
defined in /usr/include/stdio.h as /var/tmp/. That trailing slash shows
up as /var/tmp//clam..... as I noted in my earlier truss output so the
code seems not to expect it and adds another when it creates the temp
dir as seen here:
mkdir("/var/tmp//clamav-f90088fbc83891f9e230bfcfab5b3884...
There are other interesting things that happen if you run clamscan as an
unprivileged user vs running it as root. If you're not root it creates a
lot of tmp files (in /var/tmp//clamav..... here) that correlate to the
database files and .dbLock found in the defined database directory. This
means things would run faster using /tmp instead of /var/tmp as /tmp is
RAM in Solaris. It's also not real good about cleaning up old session
files. Frinstance:
$ ls -la /var/tmp/clamav*
/var/tmp/clamav-86526a22b20eae63b8fadadb88ff089a:
total 3216
drwx------ 2 root other 512 Sep 18 20:57 .
drwxrwxrwt 4 root sys 3072 Sep 22 18:40 ..
-rwxrwxr-- 1 root other 0 Sep 18 20:57 .dbLock
-rw-r--r-- 1 root other 17992 Sep 18 20:57 COPYING
-rw-r--r-- 1 root other 58 Sep 18 20:57 daily.cfg
-rw-r--r-- 1 root other 25207 Sep 18 20:57 daily.db
-rw-r--r-- 1 root other 3601 Sep 18 20:57 daily.fp
-rw-r--r-- 1 root other 4283 Sep 18 20:57 daily.hdb
-rw-r--r-- 1 root other 820 Sep 18 20:57 daily.hdu
-rw-r--r-- 1 root other 586 Sep 18 20:57 daily.info
-rw-r--r-- 1 root other 1078686 Sep 18 20:57 daily.mdb
-rw-r--r-- 1 root other 18539 Sep 18 20:57 daily.mdu
-rw-r--r-- 1 root other 457037 Sep 18 20:57 daily.ndb
-rw-r--r-- 1 root other 2640 Sep 18 20:57 daily.ndu
-rw-r--r-- 1 root other 2552 Sep 18 20:57 daily.pdb
-rw-r--r-- 1 root other 755 Sep 18 20:57 daily.wdb
-rw-r--r-- 1 root other 2922 Sep 18 20:57 daily.zmd
/var/tmp/clamav-c7a6e3219f615e699dcab552d9364154:
total 42696
drwx------ 2 root other 512 Sep 22 18:05 .
drwxrwxrwt 4 root sys 3072 Sep 22 18:40 ..
-rwxrwxr-- 1 root other 0 Sep 22 18:05 .dbLock
-rw-r--r-- 1 root other 17992 Sep 22 18:05 COPYING
-rw-r--r-- 1 root other 4736103 Sep 22 18:05 main.db
-rw-r--r-- 1 root other 3083 Sep 22 18:05 main.fp
-rw-r--r-- 1 root other 640977 Sep 22 18:05 main.hdb
-rw-r--r-- 1 root other 318 Sep 22 18:05 main.info
-rw-r--r-- 1 root other 2333904 Sep 22 18:05 main.mdb
-rw-r--r-- 1 root other 14072345 Sep 22 18:05 main.ndb
-rw-r--r-- 1 root other 217 Sep 22 18:05 main.zmd
dp
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html