No update for f-prot and C-ICAP/Blacklist (SOLVED)

This forum is for all copfilter version 2 support related questions in English. (IPCop version 2)
Severus
Site Admin
Posts: 457
Joined: 10 Dec 2009 07:01
Location: Nürnberg - Germany

Re: No update for f-prot and C-ICAP/Blacklist

Post by Severus » 08 Mar 2012 00:22

?????????? :o
and clamav updates run correctly?
Then I have no further hint, yet.
I must have some beer to think about this.
Maybe more tomorrow. Image

Oooops, just wait a minute!
Try another one:
Use the testfile you created in the past and create a new cronjob by

Code: Select all

fcrontab -e
The editor works like vi, but when exiting the changes will take effect immideately.
Add a new command
Edit:

Code: Select all

*/5 * * * * root /your_path/your_file >> /var/log/copfilter/default/opt/tools/var/log/copfiltercron.log 2>&1
then we'll see if it works.
If true then the culprit is definitively the copfilter_cron file.
In case replace it from source package.
Severus

ShelbyGT500
Posts: 846
Joined: 13 May 2010 22:37
Location: FRANCE

Re: No update for f-prot and C-ICAP/Blacklist

Post by ShelbyGT500 » 08 Mar 2012 00:40

Hi,

Yes, Clamav, 3rd sigs, and google safebrowsing update correctly:
ClamAV update process started at Wed Mar 7 22:25:00 2012
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cld is up to date (version: 14607, sigs: 112373, f-level: 63, builder: jesler)
Downloading safebrowsing-36669.cdiff [100%]
safebrowsing.cld updated (version: 36669, sigs: 1044767, f-level: 63, builder: google)
bytecode.cvd is up to date (version: 167, sigs: 40, f-level: 63, builder: edwin)
Database updated (2201567 signatures) from database.clamav.net (IP: 193.1.193.64)
Clamd successfully notified about the update


I reinstalled copfilter 2.0.91beta3 several times, i've always this problem. it was not the case on beta2 or beta1.

I am going to drink a beer too ;)

Thanks for your help.

EDIT1: beer makes me think that I have irregular updates for c-icap blacklist (it's OK when I manually change the hour ans save, but when i started my machine, i've no update at expected hour , and I've update when i change and save the hour).

EDIT 2
Severus wrote:If true then the culprit is definitively the copfilter_cron file.
In case replace it from source package.
It doesn't work. But i will try to replace copfilter_cron file.


Regards.
Last edited by ShelbyGT500 on 08 Mar 2012 01:08, edited 1 time in total.

Severus
Site Admin
Posts: 457
Joined: 10 Dec 2009 07:01
Location: Nürnberg - Germany

Re: No update for f-prot and C-ICAP/Blacklist

Post by Severus » 08 Mar 2012 01:02

Have a try with the hint in my last post.

ShelbyGT500
Posts: 846
Joined: 13 May 2010 22:37
Location: FRANCE

Re: No update for f-prot and C-ICAP/Blacklist

Post by ShelbyGT500 » 08 Mar 2012 01:21

I replaced the copfilter_cron file. But there is no change.

well, I'm going to bed :roll:
I will do other tests tomorrow.

Thanks for your help.

Regards.

karesmakro
Site Admin
Posts: 1280
Joined: 09 Dec 2009 21:17

Re: No update for f-prot and C-ICAP/Blacklist

Post by karesmakro » 08 Mar 2012 01:23

I've found the problem in copfilter_cron and I don't know, how this happened

Download the fix on http://www.it-connect-unix.de/copfilter ... ic_fix.tgz
md5sum: 4821a76099f3f997376504b4d334851c

Code: Select all

tar xzf ./copfilter_cron-fprot-periodic_fix.tgz -C /
Good night :)

in addition, I forgot to say, a IPCop reboot was not considered for the C-ICAP update :D
I'll think of something

the riddle is the old copfilter_cron used a perl pattern for searching on existence for the f-prot file.
@Severus: it is clear, that your shell command runs, but the command never runs with copfilter_cron ;)

Severus
Site Admin
Posts: 457
Joined: 10 Dec 2009 07:01
Location: Nürnberg - Germany

Re: No update for f-prot and C-ICAP/Blacklist

Post by Severus » 08 Mar 2012 01:43

:D
you're very right! I read it a twenty times or more but never realized the *${copfilter_swroot}* at any time. I always read this as a *$BASEDIR*.
As in my code for using in a separate file for testing all was replaced by full path names and so it worked fine.
Mea culpa! :cry:
Severus

ShelbyGT500
Posts: 846
Joined: 13 May 2010 22:37
Location: FRANCE

Re: No update for f-prot and C-ICAP/Blacklist

Post by ShelbyGT500 » 08 Mar 2012 12:53

Hi Severus and Kare,

The update for f-prot works fine with the fix! :D :D

Thanks for your help! ;)

EDIT 1:
karesmakro wrote:in addition, I forgot to say, a IPCop reboot was not considered for the C-ICAP update
you're right!
- when I start IPCOP at 17:00 with an update planned at 18:00, there is no update for C-ICAP Blacklist
- if i start IPCOP at 17:00, and if i change change the hour of update from 18:00 to 19:00 and save settings, the update for C-ICAP Blacklist is OK.

Regards

karesmakro
Site Admin
Posts: 1280
Joined: 09 Dec 2009 21:17

Re: No update for f-prot and C-ICAP/Blacklist (SOLVED:f-prot

Post by karesmakro » 16 Mar 2012 01:22

Update: Script is the same, but removed the overlooked point in front of the script line

So here is the temporary fix for the C-ICAP update time problem, after a IPCop reboot ;)

Download: http://www.it-connect-unix.de/copfilter ... e-time.tgz
md5sum: 57029e405205df7b3b8e67a2baa65f76

Code: Select all

wget http://www.it-connect-unix.de/copfilter/ipcop-v2/check-c_icap-update-time.tgz
tar xzvf ./check-c_icap-update-time.tgz -C /
After extracting the script, you have to add following line(s) to /var/log/copfilter/default/opt/c_icap/etc/init.d/copfilter_c-icap

Code: Select all

# check C-ICAP update time
$BASEDIR/opt/tools/bin/check-c_icap-update-time.sh
after line ~12, so it looks like

Code: Select all

#!/bin/sh

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

. /var/log/copfilter/default/etc/global_settings
. /var/ipcop/ethernet/settings
. /var/ipcop/main/settings
. /var/log/copfilter/default/langs/en.sh
. /var/log/copfilter/default/langs/${LANGUAGE}.sh
. $BASEDIR/etc2/copfilter_webinit
. $BASEDIR/etc2/copfilter_status

# check C-ICAP update time
$BASEDIR/opt/tools/bin/check-c_icap-update-time.sh
Every C-ICAP start, the new "check-c_icap-update-time.sh" checks the correct time

a small but very high note, the fix is only working for the daily update period :twisted:

ShelbyGT500
Posts: 846
Joined: 13 May 2010 22:37
Location: FRANCE

Re: No update for f-prot and C-ICAP/Blacklist (SOLVED:f-prot

Post by ShelbyGT500 » 16 Mar 2012 21:07

Hi Kare,

Thanks for this fix! :D
It's always a pleasure , because the instructions are described step by step :D

I installed the fix but, for information, i've not the same content in /var/log/copfilter/default/opt/c_icap/etc/init.d/copfilter_c-icap:

Code: Select all

#!/bin/sh

. /var/log/copfilter/default/etc/global_settings
. /var/ipcop/ethernet/settings
. /var/ipcop/main/settings
. /var/log/copfilter/default/langs/en.sh
. /var/log/copfilter/default/langs/${LANGUAGE}.sh
. $BASEDIR/etc2/copfilter_webinit
. $BASEDIR/etc2/copfilter_status


PRG="c-icap"
In line 3, i don't find : PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
I added it.

I do a report in a few minutes.
karesmakro wrote:a small but very high note, the fix is only working for the daily update period :twisted:
Thanks for information, but the fix is perfect, because i use daily update period ;)

EDIT:
The fix works fine :D

Regards.

Post Reply