Discussion:
lftp implicit ftps
Pavel qqqqqqqq
2007-10-17 14:32:10 UTC
Permalink
Hi,
I have problem with connecting to one ftps server with implicit ftps. I
can authenticate but when issuing "ls" command lftp hang and didn't
receive any data from ftps server. I don't know waht is OS and ftps
software on this server. Below you can find debug:

[***@localhost etc]# lftp -d
lftp :~> open ftps://10.66.33.59:6375
---- Resolving host address...
---- 3 addresses found
lftp 10.66.33.59:~> login bet00589 bet00589
lftp ***@10.66.33.59:~> ls
---- Connecting to 10.66.33.59 (10.66.33.59) port 6375
Certificate depth: 1; subject: /O=SOPRA/OU=CertificationUnit/CN=Sopra
Sample CA; issuer: /O=SOPRA/OU=CertificationUnit/CN=Sopra Sample CA
WARNING: Certificate verification: self signed certificate in
certificate chain
Certificate depth: 0; subject:
/C=FR/ST=Hauts-de-Seine/L=Puteaux/O=SOPRA/OU=RDM-XFB/CN=Sopra Sample
User 1; issuer: /O=SOPRA/OU=CertificationUnit/CN=Sopra Sample CA
<--- 220 Welcome to XFB Gateway FTP server
---> FEAT
<--- 530 Not logged in
---> USER bet00589
<--- 331 Send password please
---> PASS bet********
<--- 230 User logged in, proceed
---> FEAT
<--- 211-Extensions supported
<--- 211- SIZE
<--- 211- MDTM
<--- 211- AUTH TLS
<--- 211- PBSZ
<--- 211- PROT
<--- 211 End of feat command response
---> PWD
<--- 257 "/" is current directory.
---> PBSZ 0
<--- 503 Bad sequence of command
---> PROT P
<--- 503 Bad sequence of command
---> PASV
<--- 227 Entering passive mode (10,66,33,59,28,64).
---- Connecting data socket to (10.66.33.59) port 7232
---- Data connection established
---> LIST
Interrupt
---> ABOR
---- Closing aborted data socket
<--- 226 Abort received, data connection is closed
lftp ***@10.66.33.59:/> version
LFTP | Version 3.5.14 | Copyright (c) 1996-2006 Alexander V. Lukyanov

LFTP is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
There is absolutely no warranty for LFTP. See COPYING for details.

Send bug reports and questions to <***@uniyar.ac.ru>.

Libraries used: Readline 4.3, Expat 1.95.7, OpenSSL 0.9.7a Feb 19 2003,
zlib 1.2.1.2

----------------------------------------------------
Paul Oakenfold - najdroższy DJ świata
już 7 grudnia wystąpi w Hali Stulecia we Wrocławiu.
Zobacz więcej:
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fgaleria.html&sid=61
Alexander V. Lukyanov
2007-10-18 13:12:52 UTC
Permalink
Post by Pavel qqqqqqqq
---> PBSZ 0
<--- 503 Bad sequence of command
---> PROT P
<--- 503 Bad sequence of command
For some reason the server does not accept PROT command, thus lftp does not
know whether to encrypt data connection. Try
set ftps:initial-prot P
--
Alexander.
Pavel qqqqqqqq
2007-10-19 14:50:12 UTC
Permalink
Post by Alexander V. Lukyanov
Post by Pavel qqqqqqqq
---> PBSZ 0
<--- 503 Bad sequence of command
---> PROT P
<--- 503 Bad sequence of command
For some reason the server does not accept PROT command, thus lftp does not
know whether to encrypt data connection. Try
set ftps:initial-prot P
--
Alexander.
Hi Alexander, thanks for replay. I set up connection as you describe
above. I know that this server is in passive mode implicit, data port
7200 to 7299. Belowe is debug:

---> PWD
<--- 257 "/" is current directory.
---> PBSZ 0
<--- 503 Bad sequence of command
---> PASV
<--- 227 Entering passive mode (10,66,33,59,28,47).
---- Connecting data socket to (10.66.33.59) port 7215
---- Data connection established
---> LIST
`ls' at 0 [Waiting for response...]

and I can not list directory...

I also tried active mode:

lftp :~> set ftps:initial-prot P
lftp :~> set ftp:passive-mode no
lftp :~> open ftps://bet00589:*******@10.66.33.59:6375

and I can list direcotory :

---> PWD
<--- 257 "/" is current directory.
---> PBSZ 0
<--- 503 Bad sequence of command
---> PORT 10,81,128,250,128,209
<--- 200 Data port accepted
---> LIST
<--- 150 Openning data connection. List started
---- Got EOF on data connection
---- Closing data socket
total 2
drwxrwxrwx 0 --NA-- --NA-- 0 Sep 12 15:37 .
d--------- 0 --NA-- --NA-- 0 Apr 25 10:44 ..
<--- 226 List completed

but can not put any file:

lftp ***@10.66.33.59:/> put test
---> PROT C
<--- 503 Bad sequence of command
---> TYPE I
<--- 200 Command okay
---> PORT 10,81,128,250,128,210
<--- 200 Data port accepted
---> ALLO 5
<--- 200 Command okay
---> STOR test
<--- 150 Openning data connection. Start receiving 's119604.test',remote
file is: test
Certificate depth: 1; subject: /O=SOPRA/OU=CertificationUnit/CN=Sopra
Sample CA; issuer: /O=SOPRA/OU=CertificationUnit/CN=Sopra Sample CA
WARNING: Certificate verification: self signed certificate in
certificate chain
Certificate depth: 0; subject:
/C=FR/ST=Hauts-de-Seine/L=Puteaux/O=SOPRA/OU=RDM-XFB/CN=Sopra Sample
User 1; issuer: /O=SOPRA/OU=CertificationUnit/CN=Sopra Sample CA
---- Closing data socket
<--- 226 File retreived successfully (network bytes 5/file bytes 5)
5 bytes transferred
lftp ***@10.66.33.59:/> ls
---> TYPE A
<--- 200 Command okay
---> PORT 10,81,128,250,128,211
<--- 200 Data port accepted
---> LIST
<--- 150 Openning data connection. List started
Certificate depth: 1; subject: /O=SOPRA/OU=CertificationUnit/CN=Sopra
Sample CA; issuer: /O=SOPRA/OU=CertificationUnit/CN=Sopra Sample CA
WARNING: Certificate verification: self signed certificate in
certificate chain
Certificate depth: 0; subject:
/C=FR/ST=Hauts-de-Seine/L=Puteaux/O=SOPRA/OU=RDM-XFB/CN=Sopra Sample
User 1; issuer: /O=SOPRA/OU=CertificationUnit/CN=Sopra Sample CA
<--- 226 List completed
---- Got EOF on data connection
---- Closing data socket
total 2
drwxrwxrwx 0 --NA-- --NA-- 0 Sep 12 15:37 .
d--------- 0 --NA-- --NA-- 0 Apr 25 10:44 ..

Any idea?

Thanks in advance!

----------------------------------------------------
Czaruje smakiem, zapachem i kolorem.
Książka Magdy Gessler już w księgarniach! Zobacz:
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fprzepis.html&sid=65
Loading...