A problem I am attempting to troubleshoot is that lftp returns an return
code of 0, despite the fact that it can't login to the remote server and
the rest of the commands run also fail.
If I do the exact same commands manually, then lftp returns a code of 1
(expected).
So for example, let's assume we are going to run lftp using a command
script
lftp -f t.cmd
and t.cmd contains the following..
open -p 990 serverA
user bill fred
cd /
close
quit
now, the username and password I'm using are incorrect, so the ftp process
can't authenticate so this "job" will fail, I was expecting lftp to behave
similiar to manual mode in which this behavior causes lftp to return a
non-zero code of 1.
[root@serverB]:[/tmp] > lftp -f t2.prm
---- Resolving host address...
---- 1 address found: xxx.xxx.xxx.xxx
---- Connecting to serverA (xxx.xxx.xxx.xxx) port 990
<---
220-****************************************************************************
<--- *
*
<--- * Use of this system and the network is restricted to
*
<--- * authorized users.
*
<--- *
*
<--- * User activity is monitored and recorded by system personnel.
*
<--- * Anyone using this system or network expressly consents to such
*
<--- * monitoring and recording. BE ADVISED, if possible criminal
*
<--- * activity is detected, system records, along with certain
*
<--- * personal information, may be provided to law enforcement
officials. *
<--- *
*
<---
*******************************************************************************
<--- 220 serverA FTP - Authorized Use Only
<--- 211-Features:
<--- MDTM
<--- MFMT
<--- TVFS
<--- AUTH TLS
<--- MFF modify;UNIX.group;UNIX.mode;
<--- MLST
modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
<--- PBSZ
<--- PROT
<--- REST STREAM
<--- SIZE
<--- 211 End
<--- 234 AUTH TLS successful
Certificate depth: 2;
Certificate depth: 1;
Certificate depth: 0;
<--- 550 MLST modify;perm;size;type;UNIX.group;UNIX.mode;UNIX.owner;:
Forbidden command argument
<--- 331 Password required for bill
<--- 530 Access DENIED for bill
cd: Login failed: 530 Access DENIED for bill
[root@serverB]:[/tmp] > echo $?
0
I find it difficult to believe this is a bug, so I'm thinking I must be
doing something wrong...but what?
BTW, I've also tried this using lftp -e "source filename" -u bill,fred -p
990 serverA with the same results.
Thanks.
Jonathan Kaufman
Foot Locker Corporate Services, Inc.
E-Mail: [email protected]
Tel:414-357-4062
Fax:717-972-3700
Tie Line:89-221-4062
Visit us on-line at footlocker.com.
The information in this e-mail, and any attachment therein, is confidential
and for use by the addressee only. If you are not the intended recipient,
please return the e-mail to the sender and delete it from your computer.
Although the Company attempts to sweep e-mail and attachments for viruses,
it does not guarantee that either are virus-free and accepts no liability
for any damage sustained as a result of viruses.
Spam detection software, running on the system "univ.uniyar.ac.ru", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: A problem I am attempting to troubleshoot is that lftp returns
an return code of 0, despite the fact that it can't login to the remote
server
and the rest of the commands run also fail. If I do the exact same commands
manually, then lftp returns a code of 1 (expected). [...]
Content analysis details: (3.5 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
domain
-0.0 BAYES_20 BODY: Bayes spam probability is 5 to 20%
[score: 0.0524]
3.5 MAY_BE_FORGED Relay IP's reverse DNS does not resolve to IP