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 problem

Discussion in 'General Discussion' started by salvatore333, Sep 9, 2011.

  1. salvatore333

    salvatore333 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    I keep getting the below emails about twice a day:

    Subject: Cron <root@ns1> /usr/bin/freshclam --quiet --no-warnings


    ERROR: Can't open /usr/share/clamav/mirrors.dat for writing
    ERROR: Can't open /usr/share/clamav/mirrors.dat for writing
    ERROR: Can't open /usr/share/clamav/mirrors.dat for writing
    ERROR: Can't open /usr/share/clamav/mirrors.dat for writing
    ERROR: Can't open /usr/share/clamav/mirrors.dat for writing


    I uninstalled via cPanel/manage plugins/clamavconnector and then reinstalled but the error emails keep coming.

    Anybody know a permanent fix would be highly appreciated.


    have a nice weekend, Salvatore
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Does the file exist? Is is owned by clamav:clamav ?
     
  3. salvatore333

    salvatore333 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Thank you for your reply. It seems 2 of the files in the directory are owned by a customer. Don't know how that happened. Can you please give me the ssh command(s) to fix the issue?

    root@ns1 [/usr/share/clamav]# ls -alh
    total 75M
    drwxrwxr-x 2 clamav clamav 4.0K Sep 9 03:50 ./
    drwxr-xr-x 114 root root 4.0K Jun 13 13:07 ../
    -rw-r--r-- 1 clamav clamav 467K Jul 19 23:16 bytecode.cld
    -rw-r--r-- 1 clamav clamav 12M Sep 9 03:50 daily.cld
    -rw-r--r-- 1 alien001 713 63M Nov 15 2010 main.cld
    -rw------- 1 alien001 713 936 Jun 13 03:27 mirrors.dat
     
  4. salvatore333

    salvatore333 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    I ran the two below commands and hopefully that should resolve the issue. Thanks again.

    chown clamav:clamav mirrors.dat

    chown clamav:clamav main.cld
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Something like this should work to recursively change owner of all files inside that directory to clamav:

    chown -R clamav:clamav /usr/share/clamav
     
Loading...

Share This Page