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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-30-2015, 03:23 AM
|
#1
|
LQ Newbie
Registered: Apr 2015
Posts: 2
Rep: 
|
[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.
|
|
|
04-30-2015, 05:36 AM
|
#2
|
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
|
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.
|
|
|
04-30-2015, 06:09 AM
|
#3
|
LQ Newbie
Registered: Apr 2015
Posts: 2
Original Poster
Rep: 
|
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.
|
|
|
05-01-2015, 05:52 AM
|
#4
|
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
|
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.
|
|
|
05-04-2015, 09:18 PM
|
#5
|
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
|
Feedback
Have you solved your problem? If so, how?
|
|
|
All times are GMT -5. The time now is 09:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|