OS2World OLD-STATIC-BACKUP Forum

WebSite Information => Article Discussions => Topic started by: CDRWSel on 2011.02.26, 12:02:28

Title: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.02.26, 12:02:28
http://www.os2world.com/content/view/20595/2/ (http://www.os2world.com/content/view/20595/2/)
QuotePosted by Martin Iturbide - Tuesday, 22 February 2011


[a href. .. .

One more time, I'm unable to add any updates into ClamAV GUI version 2.0.0 forum entry (blank page !)

Hi Dave,

It looks like starting ClamD from config.sys makes it ignore the  "LocalSocket" which could not be initialized.
This makes Clamdscan not been able to communicate with it.
* For system protection, starting Clamd from config.sys is ok
* To use Clamdscan with Clamd, the LocalSocket must be enabled and this requires to start Clamd out of config.sys

If Clamd is added into config.sys, prefer use Clamscan or stop/re-start Clamd before use of Clamdscan
You can do like this (with rxu.dll into dll path):
- Show PIDs
- Kill Clamd process
- Verify Daemons
- Start ClamDaemon

Or, you can update startup.cmd to start clamd after eCS full initialization
I'll update docs with these restrictions.

About the clamd.conf problem you reported, I'm correcting it.
Could you please tell under which path you have clamd.conf available when installed through RPM/YUM ?
Thanks

Kind regards,
Remy
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.02.26, 16:22:48
Hi Remy,

  OK, thanks - I'll try starting Clamd either from the startup folder or startup.cmd. RPM puts clamd.conf (and freshclam.conf) in /etc .

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.02.27, 16:24:53
Hello Dave,

I corrected the cond config file problem you identified.
(Now, you'll have an option to choice if original Clamd.conf exist but this one may not be configurated when using Clamdscan as scan engine or starting clamd from ClamAV-GUI at first time)

Could you please do a try of this update
http ://remydodin.levillage.org/outils/ ClamAVGUI-2_1_2.wpi

   * Changed RUN= added position into config.sys (to prevent some MPTSTART error at start time if placed as first RUN= statement)
   * Changed REM text when adding Clamd into config.sys
   * Changed process to select ClamD config file. If original Clamd.conf file exist, it is given possibility to use it instead of ClanAV-GUI configured conf file.
   * If original Clamd config file is selected to be used, "epm" opens to allow user to correct/update his config file (User has to know which parms to add to have clamdscan working too)


Please remove blanks into above link.
Kind regards,
Remy


Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.02.27, 18:22:22
Hi Remy,

  I tried your test version 2.1.2 and it seems to work as you describe. It would be nice if when using Clamdscan(conf) the software could automatically detect which conf file is in use and just open that one... don't know if that is possible. In any case having the choice is good.

  One minor thing I just noticed. After starting ClamAVGUI, when going to ClamAVGUI settings then hitting 'save' a new freshclam_GUI.conf file is created in the ClamAVGUI directory (not /etc) and the original one saved even if there are no changes. It only happens the first time after starting ClamAVGUI. Due to all my testing I had about 60 saved freshclam_GUI.conf files in my ClamAVGUI directory. I am not sure this is what you intend.

  FYI - I start ClamD from an object in the startup folder and that seems to work well with Clamdscan.

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.02.27, 19:22:35
Hi Dave,

About automatic Clamd config file check, I prefered left end-user to make the "choice" because there are several must entries which could differ and may have other value than those defaults I use. This makes the verification more complex...
Using both ClamAV-GUI provided and generated config files makes ClamAV work in most configurations.     

I always use the ClamAVGUI provided freshclam config file due It is needed to have a correct configurated config file to allow database download at start time if none exist. This is to make it directly usable.

About new save freshclam_GUI.conf , this one should be updated only if ClamAV database path has changed... I'll check what happens here and come back....       
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.02.27, 21:19:36
Hi Dave,

I found the problem and it permited me to find an other minor problem
Could you please get again the updated file and give it a try ?

Latest updates just added
   * Corrected miss-placed instruction making default ClamAV-GUI Freshclam create unwanted backup config file at ClamAV-GUI start time
   * Corrected a possible database update end of process bug
   * Changed how initial ClamAV-GUI start generates default Freshclam config file
   * Corrected a possible not forced ClamD (if running) database reload after database update updated files
   * Corrected ClamD database reload message issued while it should not when no files database updated following a previous freshclam update.

This following first added corrections:
   * Changed RUN= added position into config.sys (to prevent some MPTSTART error at start time if placed as first RUN= statement)
   * Changed REM text when adding Clamd into config.sys
   * Changed process to select ClamD config file. If original Clamd.conf file exist, it is given possibility to use it instead of ClanAV-GUI configured conf file.
   * If original Clamd config file is selected to be used, "epm" opens it to allow user to correct/update his config file (User has to know which parms to add to have clamdscan working)

Thanks and kind regards,
Remy

PS: One more option added
   * ClamD can be auto started from config.sys or startup folder. Entries are created when starting clamd from ClamAV-GUI
      note: When using "startup" folder option, *REM* entries are added into config.sys to inform
ClamAV-GUI
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.02.28, 15:49:31
Hi Dave,

I updated the V2.1.2 test build which seems be very good for me an from other returned feedback but none under RPM/YUM.

Under an other forum thread (in discution with Doug), it was expose the problem to start multiple instance when dropping multiple files on the ClamAV-GUI icon due to same used logfile despite this one has a name using time in seconds in it.
Now I resolved it and you can drag/drop one or multiple files on ClamAV-GUI icon for ponctual scan (up to 1000)

You can get the refreshed v2.1.2 from here
http ://remydodin.levillage.org/outils/ ClamAVGUI-2_1_2.wpi

Please remove blanks into the linkname.
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.03.01, 00:23:12
Hi Remy,

  I tried this test version 2.1.2 and I still see the following issue:

Start ClamAVGUI, go to 'Settings' -> 'Clamdscan(conf)' and /etc/clamd.conf opens. Go to 'Settings' -> 'Freshclam(conf)' and /etc/freshclam.conf opens. This is correct for my setup.

Now go to 'Settings' -> 'ClamAV GUI' and hit 'Save' (you can make a change or not). Go back to either 'Clamdscan(conf)' or 'Freshclam(conf)' and now it opens C:\Programs\ClamAVGUI\xxx.conf. This is not correct.

  Also I still get a new freshclam.conf file and copied backup the first time I hit save in ClamAV GUI settings.

  I tried the drag and drop and it seemed to work well... very nice!

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.01, 01:57:28
Quote from: David McKenna on 2011.03.01, 00:23:12

Start ClamAVGUI, go to 'Settings' -> 'Clamdscan(conf)' and /etc/clamd.conf opens. Go to 'Settings' -> 'Freshclam(conf)' and /etc/freshclam.conf opens. This is correct for my setup.

Now go to 'Settings' -> 'ClamAV GUI' and hit 'Save' (you can make a change or not). Go back to either 'Clamdscan(conf)' or 'Freshclam(conf)' and now it opens C:\Programs\ClamAVGUI\xxx.conf. This is not correct.

 Also I still get a new freshclam.conf file and copied backup the first time I hit save in ClamAV GUI settings.


Hi dave,

I'm no more able to get the error about clamd.conf since I did changes.
I could get the freshclam.conf issue you described
This is because you use the clamav provided conf files instead of the clamav-GUI customized freshclam config files which has several backup links configurated in case some update links didn't respond

I didn't change this part of the code and will check this too.

I suppose you choiced to use clamd.conf and not clamd_GUI.conf ?
This selection always forces use of the this config file.... Or did a change I made under the save button dropped ! (I got this kind of problem a few build before and I'll check this and review the code about freshclam)     

Well, could you please send me your clamavgi.ini file under boot_drive: \os2 or under clamavgui path if you moved it there.

Use my clamav-gui "write to the author" email address.
Thanks

Kind regards,
Remy
 
 
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.01, 03:18:12
 :o

My supposition was right!  I redo the dropped code from last save
and I added code to set the freshclam config file to use.

Could you please get the v2.1.2 again ?
I refreshed it

Thanks
Kind regards
Remy
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.03.05, 20:03:10
Hi Remy,

  I tried the latest (2.1.2) ClamAVGUI and I still see this issue:

Quote from: David McKenna on 2011.03.01, 00:23:12

Start ClamAVGUI, go to 'Settings' -> 'Clamdscan(conf)' and /etc/clamd.conf opens. Go to 'Settings' -> 'Freshclam(conf)' and /etc/freshclam.conf opens. This is correct for my setup.

Now go to 'Settings' -> 'ClamAV GUI' and hit 'Save' (you can make a change or not). Go back to either 'Clamdscan(conf)' or 'Freshclam(conf)' and now it opens C:\Programs\ClamAVGUI\xxx.conf. This is not correct.

  Also I still get a new freshclam.conf file and copied backup the first time I hit save in ClamAV GUI settings.



other than that everything seems to work well.

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.05, 20:34:49
Hi Dave,

I hope you click at least one time on the ClamAV-GUI save button ! (This is a must)  

Wrong opened config file is no more possible due as soon you responded to the message asking you to choice the correct config file at first clamav-gui run time, the path is forced all the time to use this user selected config file with the right name which of course is different. Other existing config files are all ignored...  

About freshclam backup file, this is no more possible too.
You'll have one config file for clamd and fresclam under ClamAV-GUI path and only if you change the database path, a backup is created (there was a bug into previous build but this was corrected and only this condition will create a backup). You must have pressed at lease one time on save to save the presented configuration despite it is correct at first run time to confirm it and save it for reference.  

I would suggest you to erase existing "clamavgi.ini" file et restart ClamAV-GUI. May be something got wrong with it which could explain some issue you have.
By default, clamavgi.ini is under ..:\OS2 path except if you moved it under ClamAV-GUI path. Removing ClamAV-GUI doesn't erase the ini file which is take by any new installation.     

I was waiting on your INI files several days to check it but didn't get it into my mailbox.
May be you can send it to me before you erase it. Thanks

Do you have 2.1.2e ?

Cheers
Remy
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.03.06, 18:13:40
Hi Remy,

  I sent the ClamAVGUI.ini file today - I hope you got it.

  I am using version 2.1.2e.

  I tried deleting ClamAVGUI.ini and restarted ClamAVGUI, then went to Settings -> ClamAV GUI and set up everything and saved, but still have the same issues I reported.

  Then, I deleted ClamAVGUI using WarpIn and deleted the remaining ClamAVGUI folders and Clamd object in my startup folder and re-installed ClamAVGUI. During install I was warned that 2 freshclam.conf files exist and to choose 'Yes' if I want to use the ClamAVGUI one. I chose 'No' in order to use the ClamAV one. Same with clamd.conf. Then I was asked about adding clamav.dll to a path and I chose to leave as-is.

  Next, I started ClamAVGUI and went File -> Start Clam Daemon. I was asked how I want to start clamd and I chose put object in startup folder. An object was put into the startup folder called 'Clamd using ClamAVGUI-config'. An error appeared in the ClamAVGUI console saying 'Clam daemon failed (used parms --config-file=C:/etc/clamd.conf RPM installed =0). Looking at the 'Path and File Name' settings of the object in the startup folder, I see it is set to: C:\BIN\CLAMD.EXE. It should be C:\USR\SBIN\CLAMD.EXE. The 'Working Directory' is wrong too.I change them to C:\USR\BIN, then restart Clamd.

  Now I go to 'Settings -> ClamAV GUI'. I click the 'RPM' check box. The paths to ClamAVScan and ClamAV Updater are both set to C:\BIN\xxx.exe. They should be C:\USR\BIN\xxx.exe I change them and the indicators turn green. I hit 'Save' and a message warns that the ClamAV DB path is not correct ( \var\lib\clamav even though the indicator is green) and it changes to C:\var\lib\clamav. I hit 'OK" and then 'Save'.

  Choose Settings -> Clamdscan (conf) and the file C:\Programs\ClamAVGUI\clamd.conf opens. Choose Settings -> Freshclam (conf) and the file C:\Programs\ClamAVGUI\freshclam.conf opens. Now close ClamAVGUI and restart, choose Settings -> Clamdscan (conf) and the file C:\etc\clamd.conf opens. Go to Settings -> ClamAV GUI and hit 'Save'. A new Freshclam.conf is written. Go to Settings -> Clamdscan (conf) and the file C:\Programs\ClamAVGUI.conf opens. Clamd is using C:\etc\clamd.conf as far as I can tell. It seems as long as I do not hit 'Save' in ClamAV GUI settings, the correct *.conf files are displayed.

HTH,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.06, 19:25:51
Hi Dave,

RPM/YUM checkbox has to be checked first due you are in a RPM/YUM clamav installed environment.
I'm not able to test this and thanks to you for your effort.

As you wrote: RPM installed = 0  ( this is wrong for you and is an User error  ;D  but not all... )
Never try to start daemon or install it into startup folder while full configuration isn't done.

With RPM/YUM not checked and ClamAV 0.96.4.x was installed as WPI package using previous compatibility, unixroot is added and this one may contain a path
ex: unixroot=C:\programs\clamav
Previous WPI ClamAV as well as the latest WPI have all exe files (including clamd.exe) under \bin (no sbin exist)
So, having unixroot\bin for the daemon is correct and the result you have without RPM/YUM checked is as expected

As you know, RPM/YUM doesn't respect older installation rules and this is why you have to set it first.
With RPM/YUM checked and correct clamdscan.exe or clamscan.exe path selected, the clamd.exe will be search under sbin (RPM is on !) and other exe files under the path where clamdscan anf clamscan are


Once RPM/YUM is set, update parameters at next start and save them. You can then start clamdaemon and add it into startup folder if needed. All parameters when using RPM/YUM are correctly set after full configuration + RP/YUM checkobox is set + restart.

I'm going to send you an update soon which I hope resolves a few issue you have.

Cheers
Remy

Ps: hum ! If you check RPM/YUM, I have to disable saved path for clamd.conf and freshclam.conf...
       I'll do this and send you the update. 
 
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.06, 20:07:02
Update sent...
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.03.06, 20:28:29
Hi Remy,

 I received your updated INI and EXE files and applied them.

 Now it seems I always get /etc/clamd.conf and /etc/freshclam.conf when I go to 'Clamdscan (conf)' or 'Freshclam (conf)' - even after I hit 'save' in ClamAV GUI settings. Thanks!

 One thing still seems not right...  every time I hit 'save' in ClamAV GUI settings - even if I do not make any changes - a new freshclam.conf is written the first time I run ClamAVGUI settings. Now with this new version it is written in /etc and overwrites my original ClamAV freshclam.conf (and creates a backup). Is this what you intend? It seems to me that a new one should only be written if a change that effects freshclam.conf is made.

 With respect to the RPM checkbox - yes, now that you mention it it makes sense to set that first. Maybe you could somehow check when the startup object (or line in CONFIG.SYS) is created that the file the object is set to use actually exists and if not, give a warning message? Just a thought...

 Thanks for your continued development.

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.06, 21:12:24
You already have a message about * unixroot * used ot not into parameters title but I'm no able to know if this one is used through RPM/YUM or WPI !

I'll think about how to make things better.

This should only occur at very first run time "freshclam.conf" creation due no database path was specified at this time or found in the freshclam*.conf file.
As soon it is specified, no backup should be created until it is changed

Do you have a databasedirectory entry into your freshclam.conf file ?
Case sensitive.
e.g.
DatabaseDirectory C:/var/lib/clamav

If not, then I assume no database path exist !
This is a requirement for me and if no entry exist, "save" will create a new config file with the corresponding entry. If it is missing, add this entry into your existing config file and it should not be replaced.  

FYI (For Your Information)
As soon the ini file is loaded, I check the freshclam.conf file for the databasedirectory. If it is found and is valid, I set both old path as well current path to this value. Next called general process, compares both value and if they aren't equal, a backup is created and a new conf.file created using default value
(this may be improved next to preserve other entries but the new freshclam should give correct result and backup links for updates)

Cheers
Remy    
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.03.06, 22:39:46
Hi Remy,

  Freshclam.conf (and clamd.conf) does have the DatabaseDirectory entry as:

DatabaseDirectory /var/lib/clamav

  There is no leading C: - presumably it gets that from the UNIXROOT= value. This is how ClamAV (the RPM version) creates clamd.conf and freshclam.conf. I now notice when ClamAVGUI writes freshclam.conf it adds the leading C: to this line. Maybe this is where the trouble is?

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.06, 23:54:02

Hi Dave,

Yes, I think so.
Could you change it and add the c: and give feedback ?
Thanks

I'll reviewed my code with this information and construct the full path using both value unixroot and this value when available with databasedirectory not having drive information.

* update for test emailed * 

Cheers
Remy
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.03.08, 00:11:38
Hi Remy,

  I got your latest update (2.1.3f). It seems that now clamd.conf and freshclam.conf files created by ClamAVGUI leave off the leading C: (good!) on paths with RPM checked. But still I get a new freshclam.conf file written the first time I save ClamAVGUI settings after starting ClamAVGUI. It is strange it is only the first time...

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.08, 00:33:02
Strange,

It looks like the value you save (databasedirectory) isn't equal to the value read from the freshclam.conf file!
Hum ! Is the c: in upper characters or lower characters ?

I sent you a build which doesn't take care about mixed case characters for databasedirectory name. 

Cheers
Remy  
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.03.08, 02:13:18
Hi Remy,

  I got your new build - thanks! - but it still does the same thing.

  There is no C: anymore - even ClamAVGUI does not put a C: in its *.conf files. I believe this is the way it should be for the RPM version of ClamAV.

  What is strange is even ClamAVGUI created freshclam.conf files will be re-written the first time after starting ClamAVGUI and saving ClamAVGUI settings. Every time after that if I click 'save' in ClamAV GUI settings, no new freshclam.conf file is created.

  Here is a step-by-step example:

1. Start ClamAVGUI
2. Go to 'Settings' -> ClamAV GUI
3. Click 'Save'. The console says a new freshclam.conf is created and the old one is saved with a new suffix.
4. Go to 'Settings' -> ClamAV GUI
5. Click 'Save'. The console says nothing and no new files are created.
6. You can repeat 4 & 5 and always nothing.
7. Close ClamAVGUI
8. Restart ClamAVGUI
9. Go to 'Settings' -> ClamAV GUI
10. Click 'Save' The console says a new freshclam.conf file is created and the old one saved with a new suffix.
11. Go to 'Settings -> ClamAV GUI
12 Click 'Save' The console says nothing and no new file is created.
...etc...

  Is there something different about the way ClamAVGUI determines whether the freshclam.conf file has been changed the first time it looks compared to later times?

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.08, 08:58:02
Hi Dave,
Thanks for the details. I'll investigate deeper and come back soon..

Cheers
Remy
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.08, 10:26:01
Hi Dave,

I have found why this happens and only in RPM/YUM mode.
I sent you an updated build you can test.

Kind regards,
Remy
Title: Re: ClamAV GUI version 2.1.0
Post by: David McKenna on 2011.03.08, 14:19:53
Hi Remy,

  Yes... the new one you sent now works correctly. Thanks for your great work!

Regards,

Dave McKenna
Title: Re: ClamAV GUI version 2.1.0
Post by: CDRWSel on 2011.03.08, 23:30:57
Thanks Dave for the feedback.

ClamAV-GUI 213 is now online   (v2.1.3h)
It has improvements for RPM/YUM installed ClamAV as you can read in above exchange.

(h build has a small update into clamdscan process without verbose)

Kind regards,
Remy