Jump to: navigation, search
MithiWiki Home > ConnectXf Home > ConnectXf Administration > Configuration > Failed to start Clam AV service


Troubleshooting Icon.png
Troubleshooting
Product ConnectXf
Version All
Applies to Administrators
Level Advanced



Failed to start Clam AV service

Symptoms

  • ClamAV service status is found to be off (/etc/init.d/clamav status).
  • While trying to start the service using command (/etc/init.d/clamav start), the following errors are observed
LibClamAV Error: cli_cvdload(): Can't create temporary directory /tmp/root-tmp.c9b8ac/files/clamav-ef6160d48033e499ec237beabd26fb9d
LibClamAV Error: Can't load /var/clamav/daily.cvd: Can't create temporary directory
ERROR: Can't create temporary directory
::Error : failed to start clamav service:          
Failed to start Clam AV service:

Diagnosis

From the error message, it seems that the ClamAV service is unable to create a temporary folder under the /tmp/root-tmp.xxx folder

The user "root" has an environent variable TMPDIR set to /tmp/root-tmp.*/files (* - represents differnet names for different clam versions.)

echo $TMPDIR
/tmp/root-tmp.c9b8ac/files

When starting clamd, privileges are dropped (as clamd is run as user clamav), so clamd can't create a directory under /tmp/root-tmp.*/files .

Resolution

  • Try 'unset TMPDIR' (or whatever variable is set) before starting clamd.
unset TMPDIR
/etc/init.d/clamav start
Starting Clam AntiVirus Daemon:                            [  OK  ]
clamav service started :                                   [  OK  ]
  • After starting it, you can set it back.
TMPDIR=/tmp/root-tmp.c9b8ac/files
echo $TMPDIR
/tmp/root-tmp.c9b8ac/files

References

http://osdir.com/ml/security.virus.clamav.user/2004-02/msg00074.html