Author Topic: A couple of problems  (Read 12387 times)

0 Members and 1 Guest are viewing this topic.

Tigerw

  • Guest
A couple of problems
« on: April 13, 2006, 03:54:49 PM »
Hi,
I am a SUSE 10.0 user with KDE 3,5 desktop using the latest rpm release of avast! Linux Home Edition (1.o.5-1).

1. When avastgui is closed (using Quit button) the lockfile is not deleted.

2. I use the avast-update shellscript as a Cron job (I´m quite new to Cron) to check for updated VPS files every hour, it works great. But if I´ve used the avastgui and forgot to manually delete the lockfile afterwards the avast-update will output "avast! is running, can't update".

3. I also wan´t to use Cron for a daily virusscan and have written a small script for this purpose:

#!/bin/bash
#
#Daglig scanning efter virus i hemkatalagoen och på D och E hårddiskarna. Detta kommando körs som ett Cronjobb
#
avast -a -r/home/meriksson/.avast/report.txt -t=ZGBTRXW -p=3 /home/meriksson /windows/D /windows/E

If I manually run this script from a Terminal or with the KDE Run command avast will scan the selected catoluges like a dream and write a report.txt. My problem, however, is that I haven´t been able to run the scrip or the command itself with Cron, when it´s time nothing happens?? No output message, nothing...
I use KCron to edit the crontab entries, I have tried with entries in both the system crontab file and in my user /var/spool/cron/tabs file. Any ideas what might be wrong?

Finally I just wan´t to say that I have used avast (for Windows) for a couple of years now and I´m a big fan of this great program!



Dublin

  • Guest
Re: A couple of problems
« Reply #1 on: April 14, 2006, 11:21:01 AM »
try to write full path to 'avast'

Tigerw

  • Guest
Re: A couple of problems
« Reply #2 on: April 14, 2006, 11:55:04 AM »
Thank´s for Your reply.

 I have now tried:
/usr/bin/avast -a -r/home/meriksson/.avast/report.txt -t=ZGBTRXW -p=3 /home/meriksson /windows/D /windows/E.

If I actually sit and watch the KDE ProcessTable I can see that two avast processes starts at the scheduled time, one of them starts to work for a few seconds then it dives. Same happened whitout the full path. I am quite sure now that Cron starts the script at the scheduled time but then something happens that make avast to dive/crash?

I found this line in /var/log/messages:
Apr 14 11:35:01 linuxserver /usr/sbin/cron[6623]: (meriksson) CMD (/home/meriksson/bin/daglig-scan)


Still works great when I manually run the script.

« Last Edit: April 14, 2006, 12:00:31 PM by Tigerw »

trackguy

  • Guest
Re: A couple of problems
« Reply #3 on: June 19, 2006, 09:17:42 PM »
I am having exactly the same issue running avast from cron (both via a shell script and direct). I ave tried full paths, and the command line works fine (as root), but cron starts the job (as root) but the process stops without reporting (or doing anything) after an average of 11 seconds.

Any thoughts?


Dublin

  • Guest
Re: A couple of problems
« Reply #4 on: June 23, 2006, 11:32:36 AM »
hi, I think the problem is you normally run avast under you user account (avast reads ~/.avast/avastrc file located in your home directory) but the cron job is runned under root account and probably there isn't /root/.avast/avastrc file.
The solution is to register avast under 'root' account (/root/.avast/avastrc file will be created) or enable editing cron jobs under your user account.

Tigerw

  • Guest
Re: A couple of problems
« Reply #5 on: June 26, 2006, 03:33:11 PM »
In my case the cron job is run as user "meriksson" not as root. My crontabs entries located in /var/spool/cron/tabs/meriksson look like this:

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/kde-meriksson/kcronKPdxtc.tmp installed on Mon Jun 26 15:07:06 2006)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
# E-posta utdatan till specificerat konto.
MAILTO=myaccount@mailprovider.se
# Avast4Home uppdatering
0 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * *   /usr/bin/avast-update
# Virusscanning
15 15,20 * * *   /home/meriksson/bin/daglig-scan
# This file was written by KCron. Copyright (c) 1999, Gary Meyer
# Although KCron supports most crontab formats, use care when editing.
# Note: Lines beginning with "#\" indicates a disabled task.

The avast-update part works great, the problem is the scan part..

I have now registered avast as root and the /root/.avast/avastrc file was created. I´m sorry to say this didn´t solve my problem
« Last Edit: June 26, 2006, 03:59:36 PM by Tigerw »

Tigerw

  • Guest
Re: A couple of problems
« Reply #6 on: June 26, 2006, 06:25:21 PM »
Hi again,

Since my last post I´ve been testing some more, now when I run my shell script or the command /usr/bin/avast -a -r/home/meriksson/.avast/report.txt -t=ZGBTRXW -p=3 /home/meriksson /windows/D /windows/E
from the commandline I get a new error I haven´t seen before:

/usr/bin/avast: line 150:  7256 Segmenteringsfel        $AVAST_PREFIX/bin/$programname $*

Avast scans many files for about 1-2 minutes, all with [OK] result, then it stops with this error message. The last file scanned is /home/meriksson/.ispell_svenska [OK]

I´ve tried to scan both as normal user and as su but I get exactly the same error.

Tigerw

  • Guest
Re: A couple of problems
« Reply #7 on: August 02, 2006, 05:54:43 PM »
Hi again,

Since my last post I´ve been testing some more, now when I run my shell script or the command /usr/bin/avast -a -r/home/meriksson/.avast/report.txt -t=ZGBTRXW -p=3 /home/meriksson /windows/D /windows/E
from the commandline I get a new error I haven´t seen before:

/usr/bin/avast: line 150:  7256 Segmenteringsfel        $AVAST_PREFIX/bin/$programname $*

Avast scans many files for about 1-2 minutes, all with [OK] result, then it stops with this error message. The last file scanned is /home/meriksson/.ispell_svenska [OK]

I´ve tried to scan both as normal user and as su but I get exactly the same error.

Updated to version 1.06 and still have this segmentation fault problem.  Scanning with the GUI works great but when I use the command line scanner I get this error.
Any ideas anyone?

Carrot Cruncher

  • Guest
Re: A couple of problems
« Reply #8 on: August 03, 2006, 11:23:39 AM »
hi. i'm running fedora core 4 and don't experience any of the seg faults you describe but i do have exactly the same problem as you when it comes to scheduling scans via cron. as you say avast-update works fine but the actual scan seems to do nothing. the wrapper-script.sh definitely gets called but the avast binary seems to do nothing. it works fine from the command line, batch, & at, but not under cron. i've tried numerous things to make sure the shell it runs in is set up correctly but all to no avail. it is very frustrating.

Dublin

  • Guest
Re: A couple of problems
« Reply #9 on: August 04, 2006, 01:50:07 PM »
I'll take a look at the problem with cron daemon.

Tigerw, can you find the file where avast! fails and send me that file at: mensik@avast.com. There's probably bug in the avast! engine.

lindencot

  • Guest
Re: A couple of problems
« Reply #10 on: August 06, 2006, 01:52:16 PM »
I had the same problem as reported here, however I have found that if I append an & after the command then it seems to run ok.  If you want a report file you must include the * as if you do not no report file is generated.

eg
/usr/bin/avast -a -t A -r */scripts/report.txt /srv &

Hope this helps

Tigerw

  • Guest
Re: A couple of problems
« Reply #11 on: August 20, 2006, 04:51:54 PM »
I had the same problem as reported here, however I have found that if I append an & after the command then it seems to run ok.  If you want a report file you must include the * as if you do not no report file is generated.

eg
/usr/bin/avast -a -t A -r */scripts/report.txt /srv &

Hope this helps

Adding an & after the command did the trick, now my cron job works! Thanks!

My segmentation fault problem seems to occur when the .macromedia folder is scanned. This seems to be a folder containing data for Flashplayer. Unfortunately the command line scanner doesn´t seem to contain an option for excluding folders and files as the GUI version does? At least "avast --help" doesn´t show this option.

Carrot Cruncher

  • Guest
Re: A couple of problems
« Reply #12 on: August 23, 2006, 05:52:59 PM »
adding the ampersand sorted my cron problems as well.