Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi, I was under the impression that Freshclam was supposed to be automatically installed as a service and therefore to run automatically as required. Maybe I'm wrong, because when I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2008
    Location
    Philippines
    Posts
    27

    Clamd: Freshclam not running automatically


    Hi, I was under the impression that Freshclam was supposed to be automatically installed as a service and therefore to run automatically as required. Maybe I'm wrong, because when I check the Freshclam log, I noticed that it only updated once, which was when I installed it about a week ago and on that occasion, I ran it manually.

    Please can someone tell me how to set this up as a service please or what the correct solution is?

    Many thanks.

    pete

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,509
    Make sure your clamd service is started. I had this problem with my CentOS system previously. It works now, though I sometimes execute freshclam manually to make sure that everything is current.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    May 2008
    Location
    Philippines
    Posts
    27
    Quote Originally Posted by Rubberman View Post
    Make sure your clamd service is started. I had this problem with my CentOS system previously. It works now, though I sometimes execute freshclam manually to make sure that everything is current.
    I checked that. It's running, but still not updating. Perhaps I should set up a cron to run freshclam every four hours?

    The thing is, I thought Freshclam is already installed as a service, so I should not be setting up a cron.

    Any thoughts on this please?

    pete

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,509
    Freshclam is not set up as a service, but clamd is. You might check your clamd.conf file in /etc however. I don't remember if I did anything special to get it to update regularly, to tell the truth. It does update now, though it didn't when I first installed it. I have the following clamav packages installed:

    clamav
    clamav-db
    clamav-devel
    clamav-milter (I think this is the one that does the updating)
    clamd
    fuse-clamfs
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    May 2008
    Location
    Philippines
    Posts
    27
    Quote Originally Posted by Rubberman View Post
    Freshclam is not set up as a service, but clamd is. You might check your clamd.conf file in /etc however. I don't remember if I did anything special to get it to update regularly, to tell the truth. It does update now, though it didn't when I first installed it. I have the following clamav packages installed:

    clamav
    clamav-db
    clamav-devel
    clamav-milter (I think this is the one that does the updating)
    clamd
    fuse-clamfs
    I've done some more research and found that it really is Freshclam that is responsible for updates and it can be either run from a cron or as a daemon by using the following command:

    freshclam -d -c 4
    I found this by typing:

    freshclam --help
    where it lists the parameters. -d is for daemon and -c is the number of checks per day (in my case, 4).

    Unfortunately, even though I did that, when I did

    service freshclam status
    it says 'unrecognized service'.

    I guess it's possible that depending on how this status works, that the status would only be returned if I managed to check for the status during one of the times when it is actually active (although my understanding of a service is that it's normally always running?)

    All I can do is monitor the freshclam logs to see whether it is being updated.

    Thanks for your help.

    pete

  6. #6
    Linux Newbie
    Join Date
    Apr 2008
    Location
    India
    Posts
    170
    Hi,

    when Clam is not updating it will show the status in verbose ..
    what was the message you got while updating (freshclam)
    Regards
    David Anand
    -->Success is the list of failures ...!!!

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,509
    Freshclam isn't a service in the normal sense, though clamd is. So asking the service interface the status of freshclam will return the error seen.

    Ok. I looked in my cron.daily directory, and there is an entry for freshclam there. Its contents are as follows:
    Code:
    #!/bin/sh
    
    ### A simple update script for the clamav virus database.
    ### This could as well be replaced by a SysV script.
    
    ### fix log file if needed
    LOG_FILE="/var/log/clamav/freshclam.log"
    if [ ! -f "$LOG_FILE" ]; then
        touch "$LOG_FILE"
        chmod 644 "$LOG_FILE"
        chown clamav.clamav "$LOG_FILE"
    fi
    
    /usr/bin/freshclam \
        --quiet \
        --datadir="/var/clamav" \
        --log="$LOG_FILE" \
        --daemon-notify="/etc/clamd.conf"
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,509
    As for clamav-milter, that is for mail scanning.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #9
    Just Joined!
    Join Date
    May 2008
    Location
    Philippines
    Posts
    27

    Solved

    Think this is fixed now. Thanks for all your help.

    Remember earlier I did:

    freshclam -d -c 4
    well I just checked my freshclam.log and found that ever since, it has been updating

    You're right about it not being a service in itself. The above command seems to instruct clamd which IS running as a service, to initiate freshclam at the designated intervals.

    The documentation concerning this is pretty shocking, considering how long it's been around... bring on the competition! That's what I say.

    Thanks again.

    pete

  10. #10
    Linux Newbie
    Join Date
    Feb 2009
    Posts
    101
    I recompile clamav myself. and use crond job update database everyday.

    ^__^

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •