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
FTP_SITE(3)								 1							       FTP_SITE(3)

ftp_site - Sends a SITE command to the server

SYNOPSIS
bool ftp_site (resource $ftp_stream, string $command) DESCRIPTION
ftp_site(3) sends the given SITE command to the FTP server. SITE commands are not standardized, and vary from server to server. They are useful for handling such things as file permissions and group membership. PARAMETERS
o $ftp_stream - The link identifier of the FTP connection. o $command - The SITE command. Note that this parameter isn't escaped so there may be some issues with filenames containing spaces and other characters. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Sending a SITE command to an ftp server <?php // Connect to FTP server $conn = ftp_connect('ftp.example.com'); if (!$conn) die('Unable to connect to ftp.example.com'); // Login as "user" with password "pass" if (!ftp_login($conn, 'user', 'pass')) die('Error logging into ftp.example.com'); // Issue: "SITE CHMOD 0600 /home/user/privatefile" command to ftp server if (ftp_site($conn, 'CHMOD 0600 /home/user/privatefile')) { echo "Command executed successfully. "; } else { die('Command failed.'); } ?> SEE ALSO
ftp_raw(3). PHP Documentation Group FTP_SITE(3)
All times are GMT -4. The time now is 03:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy