View previous topic :: View next topic |
Author |
Message |
pnix n00b
Joined: 11 Apr 2005 Posts: 3
|
Posted: Mon Apr 11, 2005 11:08 am Post subject: can not unzip file |
|
|
last year I built email box(qmail) by follow the howto in this site and work fine until last week. I got email every hour from cron said
From: Cron Daemon [mailto:root@email.xxx.com]
Sent: 11 àÁÉÒ¹ 2548 16:15
To: root@email.xxx.com
Subject: Cron <root@email> test -x /usr/sbin/run-crons &&
/usr/sbin/run-crons
replace SIGN.DEF? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL
(assuming [N]one)
Error trying to unzip: fp-def.zip.
Make sure unzip is installed and it's location is within your PATH variable
Fatal error. Exiting...
I know that it come from 'virus update' script in '/opt/f-prot/check-updates.pl' and look like it can not unzip the fp-def.zip file. I'm sure unzip is in my path.
Any suggest please. |
|
Back to top |
|
|
BlackEdder Advocate
Joined: 26 Apr 2004 Posts: 2588 Location: Dutch enclave in Egham, UK
|
Posted: Mon Apr 11, 2005 11:11 am Post subject: |
|
|
You could try editting check-update.pl to include the whole path to unzip instead of just unzip. This might be needed, because the PATH variable does not get set when you call something from cron.
Code: | edwin@zaphod:~/documents/rhul/article$ whereis unzip
unzip: /usr/bin/unzip /usr/X11R6/bin/unzip /usr/bin/X11/unzip /usr/man/man1/unzip.1.gz /usr/share/man/man1/unzip.1.gz |
Seems like /usr/bin/unzip is your best bet |
|
Back to top |
|
|
mens Guru
Joined: 27 Aug 2003 Posts: 392 Location: Belgium
|
Posted: Mon Apr 11, 2005 11:13 am Post subject: |
|
|
Viruses are often disguised as zip-file, while they aren't zip files at all. This may be the reason for this error. You could manually try to unzip the file to verify this. |
|
Back to top |
|
|
tomvollerthun Guru
Joined: 19 Mar 2005 Posts: 316
|
Posted: Mon Apr 11, 2005 11:14 am Post subject: Re: can not unzip file |
|
|
pnix wrote: | I'm sure unzip is in my path. |
So you just have to convince your computer of that ;)
I think I once read that cronjobs use their own (restricted) path. You should try to find out how to change that path to include "unzip".
Or you can hack the script that uses unzip (you wrote it was '/opt/f-prot/check-updates.pl') to use the complete path to unzip and not just the command name. _________________ Computer science is no more about computers than astronomy is about telescopes.
Dijsktra
---------------
Don't believe my "Guru" status! |
|
Back to top |
|
|
mens Guru
Joined: 27 Aug 2003 Posts: 392 Location: Belgium
|
Posted: Mon Apr 11, 2005 11:28 am Post subject: |
|
|
Since you have that replace message, I think it did find unzip but there's a problem with that zip file. The error message is just a bit confusing. |
|
Back to top |
|
|
pnix n00b
Joined: 11 Apr 2005 Posts: 3
|
Posted: Mon Apr 11, 2005 11:31 am Post subject: |
|
|
thanks for fast reply but
crontab -e give me
PATH=/sbin:/bin:/usr/sbin:/usr/bin
.
.
.
0 * * * * /etc/cron.hourly/virus-update.cron
and this is virus-update.cron
#!/bin/bash
/opt/f-prot/check-updates.pl -cron -quiet
so i think unzip already in the path(/usr/bin/unzip) anyway I will try specify full path and see what happen. |
|
Back to top |
|
|
pnix n00b
Joined: 11 Apr 2005 Posts: 3
|
Posted: Mon Apr 18, 2005 8:09 am Post subject: |
|
|
mens wrote: | Since you have that replace message, I think it did find unzip but there's a problem with that zip file. The error message is just a bit confusing. |
I agree with you. I still got email what should I do, I guess that zip file is a virus definition file and it download from internet . |
|
Back to top |
|
|
pht3k n00b
Joined: 04 Apr 2005 Posts: 53 Location: Québec
|
Posted: Fri May 20, 2005 1:22 pm Post subject: |
|
|
hi,
i have a fresh gentoo install with the same problem ... and when i manually enter /opt/f-prot/tools/check-updates.pl on the terminal i have a 'nothing to be done' message. So what i'll do for now is remove this cron job and dop it manually for a while and see what happens. keep me informed if you find anything else interesting. thanks.
pht3k |
|
Back to top |
|
|
pht3k n00b
Joined: 04 Apr 2005 Posts: 53 Location: Québec
|
Posted: Fri May 20, 2005 1:43 pm Post subject: |
|
|
hi,
from the qmail install thread i can see that it seems an error in the fetching of the zip file from the f-prot website. but those people reported an intermittent error message (which is my case). u said your error message was every hour. is it really every hour or only from time to time? because if it'S not every hour i think u should not care about this error.
pht3k |
|
Back to top |
|
|
|