Forum

> > Off Topic > FTP Code Problem
Forums overviewOff Topic overviewLog in to reply

German FTP Code Problem

10 replies
To the start Previous 1 Next To the start

old FTP Code Problem

k.o.g.
User Off Offline

Quote
Guten Tag, ich programmiere gerade einen kleinen FTP Clienten, das verbinden und alles geht, doch leider kann ich die Ordnerliste nicht abrufen, es folgt immer:
[19:43:43] 425 No data connection

Keine ahnung womit dies verursacht wird, ich hoffe jemand kann mir helfen, den ich mache es genau gleich wie SmartFTP

old Re: FTP Code Problem

bizzl
User Off Offline

Quote
Hast du die verbindung auf Text (ASCII) umgeschalten.
Die Ordnerliste kann nicht binär übertragen werden.

old Re: FTP Code Problem

k.o.g.
User Off Offline

Quote
Funktioniert trotzdem nicht, sende den Befehl NLST nach dem PASV Mode wie in einem B3D Bespiel:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Keine Verbindung vorhanden.
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 7 of 50 allowed.
220-Local time is now 17:45. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
331 User beni OK. Password required
230-User beni has group access to:  beni    
230 OK. Current restricted directory is /
200 TYPE is now ASCII
227 Entering Passive Mode (194,150,248,65,54,146)
150 Accepted data connection
226-Options: -a 
226 27 matches total

doch leider funktioniert dies nicht

old Re: FTP Code Problem

bizzl
User Off Offline

Quote
Ich hab einfach mal ne Connection Filezilla->Funpic aufgebaut, hier der dump:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Status:	Connecting to bizzl.bi.funpic.de ...
Status:	Connected with bizzl.bi.funpic.de. Waiting for welcome message...
Response:	220 Welcome. FTP Server ready.
Command:	USER bizzl
Response:	331 Password required for bizzl.
Command:	PASS ********
Response:	230 User bizzl logged in.
Command:	SYST
Response:	215 UNIX Type: L8
Command:	FEAT
Response:	211-Features:
Response:	 MDTM
Response:	 REST STREAM
Response:	 SIZE
Response:	211 End
Status:	Connected
Status:	Retrieving directory listing...
Command:	PWD
Response:	257 "/" is current directory.
Command:	TYPE A
Response:	200 Type set to A
Command:	PASV
Response:	227 Entering Passive Mode (213,202,225,48,120,45).
Command:	LIST
Response:	150 Opening ASCII mode data connection for file list
Response:	226 Transfer complete.
Status:	Directory listing successful
Dem entnehme ich das LIST das äquivalent zu dir/ls ist. NLST gibt es anscheinend nicht.

old Re: FTP Code Problem

k.o.g.
User Off Offline

Quote
Hmm bei mir kommt anstatt

150 Opening ASCII mode data connection for file list

kommt

150 Accepted data connection

old Re: FTP Code Problem

bizzl
User Off Offline

Quote
Das hängt mit deinem Programm zusammen.
Du hast da bestimmt irgend eine DLL benutzt, und die gibt dir halt nen anderen String als Filezilla.
Bei dir sind auch die Ausgaben für USER anders
("User beni ok. password required" -> "password required for bizzl") Das hängt echt mit dem Empfangsmodul zusammen.
Die Befehle sind wichtiger. Gib mal die befehle so durch wie sie bei mir waren, vllt hilfts.
Also nach den 220 Responses:
USER beni
PASS pwd
SYST
FEAT
PWD
TYPE A
PASV
LIST

old Re: FTP Code Problem

k.o.g.
User Off Offline

Quote
Ich schreibe das Programm gerade mit B+ und benutze keine DLL, aber werde es später versuchen.

Ist FEAT wichtig?

old Re: FTP Code Problem

bizzl
User Off Offline

Quote
nein, es gibt nur die ftp-features des server zurück. sofern du nicht irgnedwelche abartigen spielchen treiben willst muss das net sein.

Aber FTP ohne DLL? Nun gut, ich weiß ja net so viel von den Blitzen, besonders net von B+.
Delphi schaffst ja auch ohne DLL, warum soll es da nicht auch gehen.

old Re: FTP Code Problem

bizzl
User Off Offline

Quote
k.o.g. has written
Ich greife über den TCP auf den FTP Server zu

Wie auch anders? FTP ist eine Subform von TCP.

old Re: FTP Code Problem

k.o.g.
User Off Offline

Quote
Nunja, vielleicht dachtest du ich benutze etwas anderes, naja sry weil ich es erwähnt hatte...
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview