The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Clamav Not Locked

Discussion in 'General Discussion' started by reactorh, Jul 20, 2007.

  1. reactorh

    reactorh Well-Known Member

    Joined:
    Aug 2, 2005
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Do anyone know why i got this error: :confused:

    [root@fusion /]# /usr/bin/freshclam --quiet --log-verbose --daemon-notify
    ERROR: chdir_inc: Can't create directory main.inc
    ERROR: getfile: Can't create new file ./clamav-dc23f6b7610f36a11d4627c5cb32e6e7 in /usr/share/clamav
    ERROR: Can't download main.cvd from database.clamav.net
    LibClamAV Error: Database Directory: /usr/share/clamav not locked
    [root@fusion /]#

    And how can i fix it?

    Im running:
    [root@fusion /]# clamscan -V
    ClamAV 0.90.2/3706/Fri Jul 20 09:24:39 2007


    Thx :D
     
  2. reactorh

    reactorh Well-Known Member

    Joined:
    Aug 2, 2005
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Someone knows how to fix this issue?

    Thx :D
     
  3. roba

    roba Member

    Joined:
    Jan 20, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Prague, CZ
    cPanel Access Level:
    Root Administrator
    I have similiar problem on WHM 11 server:



     
  4. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    Did you install clamav your self or through WHM?

    Did you recently upgrade to WHM 11, and if so, did you have any trouble with clamav before this?
     
  5. roba

    roba Member

    Joined:
    Jan 20, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Prague, CZ
    cPanel Access Level:
    Root Administrator
    I got new VPS with version 10 and autoupdate set to STABLE tree. I changed it to RELEASE tree so my WHM/cPanel was updated automatically to version 11. There were no errors.

    ClamAV was not installed on version 10. I installed it after upgrade to version 11, via Plugins option in WHM. There is a checkbox "Install and keep updated" under clamavconnector plugin, that is how I installed it.

    ClamAV is running, I can see catched emails in the log. Also manual scan initiated from cPanel works. It even updated the program from version 90.something to 91, like day or two after I installed it. But virus database updates are failing every day with the error I posted above.
     
  6. roba

    roba Member

    Joined:
    Jan 20, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Prague, CZ
    cPanel Access Level:
    Root Administrator
    @OP

    Look at your database directory and check if there is .dbLock file, delete it and try to run update again.


    @My problem

    I tried to run freshclam update to another directory (/tmp), where no current Clamav files were present - update worked without any errors, even incremental update worked (I copied outdated database files to /tmp and ran freshclam on them).

    When I delete current database files from ClamAV dir, update works - it downloads new database and notify clamd. But once they are there, update program is unable to work with them. However it does not have problem with creating temp directory, just with saving files into it. I really don't understand it. Permissions are ok, I tried to run it as root or as clamav user... Always same error message (see my first post).
     
  7. RACKSET

    RACKSET Active Member

    Joined:
    Apr 28, 2006
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    localhost
    Sorry for bump this up, but I found one reason of this error, added here to help someone else.

    If you get some error like:

    Maybe user clamav is out of quota. Just dl main.cvd from direct link (to see link run freshclam -vv)

    # cd /usr/share/clamav/
    # wget http://database.clamav.net/main.cvd
    # chown clamav:clamav main.cvd
    If you got error (chown: changing ownership of `main.cvd': Disk quota exceeded), user clamav is out of quota. To see clamav quota:

    # quota -u clamav

    To edit clamav quota:

    # edquota clamav

    Disk quotas for user clamav (uid 32xxx):
    Filesystem blocks soft hard inodes soft hard
    /dev/simfs 18032 307200 307200 8 0 0

    Change soft,hard values, it should be in KB (not sure), save.

    # chown clamav:clamav main.cvd

    Done? update clamav:

    # freshclam
     
Loading...

Share This Page