Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[FTP] Datenverbindung (was: [tin]: Neue Programmversion 2.6.3 freigegeben)

1 view
Skip to first unread message

Marcel Logen

unread,
Nov 7, 2023, 5:58:43 AM11/7/23
to
Martin Schnitkemper in de.test:

>Am Di, 07.11.2023 um 00:06 schrieb Marcel Logen:

[FTP mit nc (ohne FTP-Programm)]
>> Wenn ich das richtig verstehe, könnte ich das Schließen
>> der Datenverbindung durch Nutzung eines anderen "trans-
>> mission mode" als STREAM, also mit BLOCK oder COMPRESSED,
>> verhindern.
>
>Ich starte den FTP-Client direkt im passive mode:
>
>| [martin@mars tmp]$ ftp -p -n
[...]

Ja, danke. Das ist aber eine andere Situation als bei mir.

Du benutzt das Programm "ftp", ich verwende telnet und nc
(natürlich nur zu Test- und Lernzwecken). Da muß ich die
Datenverbindung gesondert aufmachen (wie es im FTP vorgese-
hen ist).

Jetzt wäre interessant zu erfahren, ob "ftp" bei jedem Trans-
fer einer Datei (innerhalb einer Sitzung) eine neue Datenver-
bindung öffnet.

Marcel

Vorschlag:
fup2 de.comm.protocols.misc

[supersedes wg. vergessenen Subject-Wechsels]
--
╭──────╮ ╭─╮ ╭─╮ ..34..╭──────╮ ╭────────╮ ╭────╮
╮ ╭──╯ ╭───╯ ╭───╮ ╭──╯ ╰──╯ ╰─╮ │ ╭───╯ ╭─╯ ╭─────╯ ╭──╯ ╭─╯
╰─╯ ╭──╯ ╭──╯ ╰──╯ ..26..╭─╯ │ │ ╭──╯ ╰────╮ │ ╭──╯ ╭
╰─────╯ ╰───────╯ ╰───╯ ..54..╰───╯ ╰────╯

Marcel Logen

unread,
Nov 7, 2023, 10:07:49 AM11/7/23
to
Urs Janßen in de.comm.protocols.misc:

>Marcel Logen <33320000...@ybtra.de> wrote:

>> Jetzt wäre interessant zu erfahren, ob "ftp" bei jedem Trans-
>> fer einer Datei (innerhalb einer Sitzung) eine neue Datenver-
>> bindung öffnet.
>
>RFC 1123 4.1.2.6 PASV
>| a new PASV command MUST be issued before each transfer command,
>| to obtain a unique port pair.

So kam mir das auch vor bei meinen Tests.

Dann hatte ich das in meiner Antwort
<news:20231106...@o15.ybtra.de>
an Dich wohl flcash verstanden.

Ich hatte in RFC959 gelesen:

| 3.3. DATA CONNECTION MANAGEMENT
[...]
| Reuse of the Data Connection: When using the stream mode of data
| transfer the end of the file must be indicated by closing the
| connection. This causes a problem if multiple files are to be
| transfered in the session, due to need for TCP to hold the
| connection record for a time out period to guarantee the reliable
| communication. Thus the connection can not be reopened at once.
|
| There are two solutions to this problem. The first is to
| negotiate a non-default port. The second is to use another
^^^^^^^^^^^
| transfer mode.
^^^^^^^^^^^^^
|
| A comment on transfer modes. The stream transfer mode is
| inherently unreliable, since one can not determine if the
| connection closed prematurely or not. The other transfer modes
| (Block, Compressed) do not close the connection to indicate the
| end of file. They have enough FTP encoding that the data
| connection can be parsed to determine the end of the file.
| Thus using these modes one can leave the data connection open
| for multiple file transfers.

>siehe auch RFC 2428 3 EPSV

Danke. Damit hatte ich auch schon gespielt.

Da finde ich aber nichts zur Wiederverwendung der Daten-
verbindung.

Davon abgesehen wäre eine Wiederverwendung der Datenver-
bindung im Zusammenspiel mit "nc" und einer Umleitung in
eine Datei auch eher verkomplizierend, da ich die Datei
ja dann am Ende nach den Outputs der verschiedenen FTP-
Kommandos (LIST, RETR etc.) aufteilen müßte.

Marcel
--
───╮ ╭─╮ ╭─────╮ ╭─────────╮ ╭──╮ ..59..╭─╮
╭─╯ │ ╰─╮ │ │ ╰───╮ ╭──╯ ╭──╯ │ ..56..╭──╯ ╰─╮
╰────╯ ╰─╯ ╰─╮ ╭─╯ │ ..34..╰─╮ │ ╭──╮ ╭─╮ ╭───╯ ╭─╯
╰────╯ ╰──────────╯ ╰──╯ ╰─╯ ╰─╯ ..61..╰─────

Marcel Logen

unread,
Nov 7, 2023, 12:28:40 PM11/7/23
to
Marcel Logen in de.comm.protocols.misc:

>Urs Janßen in de.comm.protocols.misc:

[...]

>>siehe auch RFC 2428 3 EPSV
>
>Danke. Damit hatte ich auch schon gespielt.
>
>Da finde ich aber nichts zur Wiederverwendung der Daten-
>verbindung.

Praktisch ist aber, daß man mit EPSV nicht rechnen muß,
da die Portnummer gleich im 'Klartext' angegeben wird.

Ingrid
--
╭────╮ ╭─╮ ╭──╮ ╭──╮ ╭──╮ ╭───────╮ ..67..
───╮ ╰─╮ ╰──────╯ ╰─╯ ╰──╮ ╭─────╯ ╰──╯ │ ╭─╯ │ ..66..╭
│ ╰─╮ │ ╰─╮ ╭─╯ │ ..56..╰────╮ ╭─╯
╰──────╯ ╰───────╯ ╰───╯ ..61..╰──╯

Marcel Logen

unread,
Nov 7, 2023, 1:24:45 PM11/7/23
to
Marcel Logen in de.comm.protocols.misc:

>Praktisch ist aber, daß man mit EPSV nicht rechnen muß,
>da die Portnummer gleich im 'Klartext' angegeben wird.

Man muß sich aber beeilen, diesen Port auch für die Daten-
verbindung zu nutzen (3 Sekunden oder so, AFAICS), sonst
ist er wieder zu. Zumindest beim tin-Server.

Ingrid L.
--
╭─╮ ╭─────╮ ╭───╮ ╭────╮..44..╭───╮ ╭───╮ ╭─────╮
...1..╭─╯ ╰─╮ ╭─╮ ╰──╮ ╰───╯ │ │ ╭─╯ ╭───╯ │ │ ╰───╯ ╰─
───╮ ╰──╮ │ │ ╰───╮ │ ╭───────╯ │ ╰─╮ ╰─╮ ╭─╯ │ ..67..
╰─────╯ ╰──╯ ╰─╯ ╰──────────╯ ╰────╯ ╰────╯ ..67..
0 new messages