LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-30-2015, 03:23 AM   #1
Sad_user
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Rep: Reputation: Disabled
Exclamation [LFTP] This gets me crazy...


Hello fellow forum users.

I got some serious trouble with lftp.

This is what I am doing (copy paste from my terminal without modification) :


Code:
[root@s-starbatch-01 20150429]# ls
Ext_entretien_chaudiere_active_CRM_290415.csv  Ext_entretien_chaudiere_active_CRM.csv
[root@s-starbatch-01 20150429]# lftp -p 990 -u user,password ftp.ds-services.fr -e "set ssl:verify-certificate no; set ftp:ssl-allow yes; set ftp:ssl-auth TLS; cd upload; put Ext_entretien_chaudiere_active_CRM.csv;quit;"
cd ok, cwd=/upload
put: Access failed: 550 SSL/TLS required on the data channel (Ext_entretien_chaudiere_active_CRM.csv)
=> Ok I got an error because the data isn't encrypted with the put command, strange in my opinion, since the option to cypher the data is in the -e command.

Then I do this (which is exactly the same, just in 2 parts) :

Code:
[root@s-starbatch-01 20150429]# lftp -p 990 -u user,password ftp.ds-services.fr -e "set ssl:verify-certificate no; set ftp:ssl-allow yes; set ftp:ssl-auth TLS; cd upload;"
cd ok, cwd=/upload
lftp proxiservedocs@ftp.ds-services.fr:/upload> ls
lftp proxiservedocs@ftp.ds-services.fr:/upload> put Ext_entretien_chaudiere_active_CRM.csv;
1198 bytes transferred
lftp proxiservedocs@ftp.ds-services.fr:/upload> ls
-rw-r--r--   1 proxiservedocs userftp      1198 Apr 29 01:47 Ext_entretien_chaudiere_active_CRM.csv
lftp proxiservedocs@ftp.ds-services.fr:/upload>
Why is it working like this ?!

Since I'm trying to upload the file with a script, I really need it to be written on a single line. Any idea what I should do ?

And no I can't add those options in the lftp.conf file, I'm using lftp for different kind of stuff.

Thanks in advance for any help !

Last edited by Sad_user; 04-30-2015 at 03:24 AM.
 
Old 04-30-2015, 05:36 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,163

Rep: Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944
Poor program

lftp is defaulting to ftp (non-encrypted) behavior for the initial connections because you have not given it proper instruction. Your script specifies the encryption after the connection, but the server is requiring it earlier. You must either provide a URL that specifies the encrypted protocol (not just a hostname), or provide a command option to lock in the protocol.

My preference, use the URL, Something like sftp://ftp.ds-services.fr might work. In this case it looks like ftps://ftp.ds-services.fr may work if the first option does not, but I have not tested either against this host.

I hope that this helps.
 
Old 04-30-2015, 06:09 AM   #3
Sad_user
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hello,

Thanks for the reply. That could have been an option yes, sadly the ftp requires explicit TLS so the correct way is either ftp://ftp.ds-services.fr or ftp.ds-services.fr (since ftp is default as you said).

If I use ftps://ftp.ds-services.fr it requires implicit TLS which doesn't work for this ftp, and sftp:// wouldn't work at all of course because thats ssh.

Still searching, thanks for the help though, I feel less lonely.
 
Old 05-01-2015, 05:52 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,163

Rep: Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944
OK. lftp oddity

Hmmm.

try this, do not use the -e option, instead use 'here' document redirection and stack the commands that way.
Something like
Code:
lftp -u user,pass p 21 ftp://ftp.thoseguys.fr <<END
set ssl:verify-certificate no 
set ftp:ssl-allow yes 
set ftp:ssl-auth TLS 

cd upload 
put Ext_entretien_chaudiere_active_CRM.csv
ls

quit

END
and see how that works.
 
Old 05-04-2015, 09:18 PM   #5
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,163

Rep: Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944
Feedback

Have you solved your problem? If so, how?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Going crazy with crazy contact lenses puffaddering Linux - Certification 1 07-29-2007 08:42 PM
lftp HELP knappster Linux - Software 2 08-03-2004 10:34 AM
about lftp oskernel Linux - Software 1 10-29-2003 02:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration