Sponsored Content
Full Discussion: Error with LFTP
Top Forums Shell Programming and Scripting Error with LFTP Post 303017686 by zooby on Sunday 20th of May 2018 08:35:40 AM
Old 05-20-2018
Script which i use

Code:
FNAME="\"'FDSD109.PRD.SARS.WRKS.GBLCDS'"\"
echo $FNAME
ftplog=$WHOME/output/ftp_${FILE_NAME}${FILE_SUFFIX}
(lftp -d -e "set ftp:passive-mode false; put -a ${SPOOLFILE} -o ${FNAME}; exit" -u ${id},${paswd} ${host} ) >> $ftplog

Output when executing

Code:
+ FNAME='"'\''FDSD109.PRD.SARS.WRKS.GBLCDS'\''"'
+ echo '"'\''FDSD109.PRD.SARS.WRKS.GBLCDS'\''"'
"'FDSD109.PRD.SARS.WRKS.GBLCDS'"
+ ftplog=/output/ftp_FDSD109.PRD.SARS.WRKS.GBLCDS.200518071144
+ >>output/ftp_FDSD109.PRD.SARS.WRKS.GBLCDS.200518071144

+ lftp -d -e 'set ftp:passive-mode false; put -a Extract/EIS/files/FDSD109.PRD.SARS.WRKS.GBLCDS.200518071144 -o "'\''FDSD109.PRD.SARS.WRKS.GBLCDS'\''"; exit' -u xxxx,yyyy zzz.zzz.com
---- Connecting to zzz.zzz.com  port 21
<--- 220-NTFTP1 IBM FTP CS V2R1 at zzz.zzz.COM, 11:11:45 on 2018-05-20.
<--- 220 Connection will close if idle for more than 10 minutes.
---> FEAT
<--- 211- Extensions supported
<---  AUTH TLS
<---  PBSZ
<---  PROT
<--- 211 End
---> AUTH TLS
<--- 234 Security environment established - ready for negotiation
---> USER xxxx
<--- 331 Send password please.
---> PASS yyyy
<--- 230 xxxx is logged on.  Working directory is "xxxx.".
---> PWD
<--- 257 "'xxxx.'" is working directory.
---> PBSZ 0
<--- 200 Protection buffer size accepted
---> PROT C
<--- 536 Data connection protection clear not supported
---> PORT 19,111,6,226,133,20
<--- 200 Port request OK.
---> ALLO 2042285
<--- 202 ALLO not necessary, you may proceed
---> STOR 'FDSD109.PRD.SARS.WRKS.GBLCDS'
<--- 425-Server requires protected data connection.
<--- 425 Can't open data connection.
---- Closing data socket
---> PORT 19,111,6,226,227,163
<--- 200 Port request OK.
---> STOR 'FDSD109.PRD.SARS.WRKS.GBLCDS'
<--- 425-Server requires protected data connection.
<--- 425 Can't open data connection.




Moderator's Comments:
Mod Comment It's NOT a good idea to post login data. I concealed it for you...

Last edited by RudiC; 05-20-2018 at 10:13 AM.. Reason: obfuscated possibly sensitive data
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

lftp transmission error help

We have installed lftp version 3.4.7. When trying to send a file it loops on sending. It appears that the lftp sends about 130k then attempts to verify transmission (with a head command maybe). The receiver is pulling the data immediatly behind the firewall and does not appear to be answering... (0 Replies)
Discussion started by: Iversog
0 Replies

2. UNIX for Advanced & Expert Users

LFTP Mirroring

LFTP Mirroring We are planning to use lftp to mirror some of the files and directories on to the remote server. What we exactly want to do is mirror some of the directories and exclude some of the the directories from "/" i.e. main root. . What lftp is doing is... (0 Replies)
Discussion started by: sameerarora
0 Replies

3. UNIX for Advanced & Expert Users

lftp: Option to lftp a file, wait and download a file as soon as its created

Please let me know what is lftp options combination to wait and download a file from target as soon as its gets created. I tried with different options but not able to get it working as I need any help would be appreciated (4 Replies)
Discussion started by: bmkux
4 Replies

4. Shell Programming and Scripting

Lftp with dialog

Hi all. I want to know, if there is any chance to pass lftp listing to CLI dialog. I want to make an interactive CLI ftp manager, based on lftp. Version of dialog I use: root@dlink:~# dialog -v cdialog (ComeOn Dialog!) version 1.1-20100428 (0 Replies)
Discussion started by: n158
0 Replies

5. Red Hat

Lftp issue

I installed KVM and configured two virtual machines in it server1.example.com(192.168.100.193) and tester1.example.com(192.168.100.230).I want to access server1.example.com from tester1.example.com over lftp.As far as networking is concerned between both I do have some doubts. I tried ping and... (5 Replies)
Discussion started by: shazgaurav
5 Replies

6. UNIX for Dummies Questions & Answers

Lftp operation

dear all, I need to get files from ftp when only files consist of words 'EUROPE' ftp sources in folder /ftp1/ftp2/ftp3/201409 files inside /ftp1/ftp2/ftp3/201409is as below 201409_EUROPE_citizen.txt 201409_EUROPE_natality.txt 201409_EUROPE_occupancy.txt 201409_ASIA_citizen.txt... (1 Reply)
Discussion started by: radius
1 Replies

7. Shell Programming and Scripting

lftp is not working.how to replace lftp with expect utility using same .cfg file.

We have lftp command inside shell file. which is intern calling .cfg file for transferring the file from one server to other. Below command to not working. lftp -e "set net:max-retries 1; set net:reconnect-interval-base 1; put -E -O /destinationdir/inbox/ /sourcedir/test.txt; bye" -u... (4 Replies)
Discussion started by: johnsnow
4 Replies

8. Shell Programming and Scripting

Lftp command

Hello, I am trying to write a script that will lftp a file. The parameters are being passed in to the script from ETL tool. The put command is not working. put $file_name $tgt_file_name in the function ftpfile(). When I hardcode the file name with path its working. can some one help me... (5 Replies)
Discussion started by: skatpally
5 Replies
SLEEP(1)						    BSD General Commands Manual 						  SLEEP(1)

NAME
sleep -- suspend execution for an interval of time SYNOPSIS
sleep seconds DESCRIPTION
The sleep utility suspends execution for a minimum of seconds. It is usually used to schedule the execution of other commands (see EXAMPLES below). Note: The NetBSD sleep command will accept and honor a non-integer number of specified seconds. This is a non-portable extension, and its use will nearly guarantee that a shell script will not execute properly on another system. When the SIGINFO signal is received, the estimate of the amount of seconds left to sleep is printed on the standard output. EXIT STATUS
The sleep utility exits with one of the following values: 0 On successful completion, or if the signal SIGALRM was received. >0 An error occurred. EXAMPLES
To schedule the execution of a command for 1800 seconds later: (sleep 1800; sh command_file >& errors)& This incantation would wait half an hour before running the script command_file. (See the at(1) utility.) To reiteratively run a command (with csh(1)): while (1) if (! -r zzz.rawdata) then sleep 300 else foreach i (*.rawdata) sleep 70 awk -f collapse_data $i >> results end break endif end The scenario for a script such as this might be: a program currently running is taking longer than expected to process a series of files, and it would be nice to have another program start processing the files created by the first program as soon as it is finished (when zzz.rawdata is created). The script checks every five minutes for the file zzz.rawdata, when the file is found, then another portion processing is done courteously by sleeping for 70 seconds in between each awk job. SEE ALSO
at(1), nanosleep(2), sleep(3) STANDARDS
The sleep command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. BSD
August 13, 2011 BSD
All times are GMT -4. The time now is 05:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy