• Data connection already open?

    From Björn Wiberg@2:201/137 to g00r00 on Monday, March 14, 2022 19:04:10
    Hello g00r00!

    When using the FTP server with passive FTP (e.g. the 'pftp' command), I get a lot of "Data connection already open" messages followed by "Closing data connection". Is this normal?

    (The file listings show up as they should.)

    + 2022.03.14 18:53:37 FTP > Connect on slot 1/10 (127.0.0.1)
    + 2022.03.14 18:53:37 FTP 1-HostName localhost.localdomain
    + 2022.03.14 18:53:37 FTP 1-Country Unknown (-)
    + 2022.03.14 18:53:38 FTP 1-C: USER Data: guest
    + 2022.03.14 18:53:38 FTP 1-S: 331 User name okay, need password.
    + 2022.03.14 18:53:39 FTP 1-C: PASS
    + 2022.03.14 18:53:39 FTP 1-S: 230 User logged in, proceed.
    + 2022.03.14 18:53:39 FTP 1-Logged in as guest
    + 2022.03.14 18:53:39 FTP 1-C: SYST Data:
    + 2022.03.14 18:53:39 FTP 1-S: 215 UNIX Type: L8
    + 2022.03.14 18:53:40 FTP 1-C: PASV Data:
    + 2022.03.14 18:53:40 FTP 1-S: 227 Entering Passive Mode (188,149,138,116,198,212).
    + 2022.03.14 18:53:40 FTP 1-C: LIST Data:
    + 2022.03.14 18:53:40 FTP 1-Listing files in /
    + 2022.03.14 18:53:40 FTP 1-S: 125 Data connection already open
    + 2022.03.14 18:53:40 FTP 1-S: 226 Closing data connection.
    + 2022.03.14 18:53:43 FTP 1-C: CWD Data: uploads
    + 2022.03.14 18:53:43 FTP 1-S: 250 Working directory is now "/uploads"
    + 2022.03.14 18:53:43 FTP 1-Changed to uploads
    + 2022.03.14 18:53:44 FTP 1-C: PASV Data:
    + 2022.03.14 18:53:44 FTP 1-S: 227 Entering Passive Mode (188,149,138,116,198,212).
    + 2022.03.14 18:53:44 FTP 1-C: LIST Data:
    + 2022.03.14 18:53:44 FTP 1-Listing files in uploads
    + 2022.03.14 18:53:44 FTP 1-S: 125 Data connection already open
    + 2022.03.14 18:53:44 FTP 1-S: 226 Closing data connection.
    + 2022.03.14 18:53:52 FTP 1-C: QUIT Data:
    + 2022.03.14 18:53:52 FTP 1-S: 221 Goodbye
    + 2022.03.14 18:53:52 FTP 1-Connection closed

    Active FTP (e.g. the 'ftp' command) does not exhibit this:

    + 2022.03.14 19:02:33 FTP > Connect on slot 1/10 (192.168.1.1)
    + 2022.03.14 19:02:33 FTP 1-HostName router.asus.com
    + 2022.03.14 19:02:33 FTP 1-Country Unknown (-)
    + 2022.03.14 19:02:35 FTP 1-C: USER Data: guest
    + 2022.03.14 19:02:35 FTP 1-S: 331 User name okay, need password.
    + 2022.03.14 19:02:36 FTP 1-C: PASS
    + 2022.03.14 19:02:36 FTP 1-S: 230 User logged in, proceed.
    + 2022.03.14 19:02:36 FTP 1-Logged in as guest
    + 2022.03.14 19:02:36 FTP 1-C: SYST Data:
    + 2022.03.14 19:02:36 FTP 1-S: 215 UNIX Type: L8
    + 2022.03.14 19:02:37 FTP 1-C: PORT Data: 192,168,1,5,145,95
    + 2022.03.14 19:02:37 FTP 1-S: 200 Command okay.
    + 2022.03.14 19:02:37 FTP 1-C: LIST Data:
    + 2022.03.14 19:02:37 FTP 1-Listing files in /
    + 2022.03.14 19:02:37 FTP 1-S: 150 File status okay; opening data connection. + 2022.03.14 19:02:37 FTP 1-Connecting to 192.168.1.5 port 37215
    + 2022.03.14 19:02:37 FTP 1-Data connection established
    + 2022.03.14 19:02:37 FTP 1-S: 226 Closing data connection.
    + 2022.03.14 19:02:38 FTP 1-C: PORT Data: 192,168,1,5,199,253
    + 2022.03.14 19:02:38 FTP 1-S: 200 Command okay.
    + 2022.03.14 19:02:38 FTP 1-C: LIST Data:
    + 2022.03.14 19:02:38 FTP 1-Listing files in /
    + 2022.03.14 19:02:38 FTP 1-S: 150 File status okay; opening data connection. + 2022.03.14 19:02:38 FTP 1-Connecting to 192.168.1.5 port 51197
    + 2022.03.14 19:02:38 FTP 1-Data connection established
    + 2022.03.14 19:02:38 FTP 1-S: 226 Closing data connection.
    + 2022.03.14 19:02:39 FTP 1-C: QUIT Data:
    + 2022.03.14 19:02:39 FTP 1-S: 221 Goodbye
    + 2022.03.14 19:02:39 FTP 1-Connection closed

    I have the Time Out for the FTP server set to 300 seconds, if that would matter somehow.

    Thanks in advance!

    Best regards
    Björn

    --- Mystic BBS v1.12 A48 2022/03/11 (Linux/64)
    * Origin: Star Collision BBS, Uppsala, Sweden (2:201/137)