Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-723

FTPSClient cannot transfer files to FileZilla Server 1.7.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.9.0
    • None
    • FTP
    • None

    Description

      The FTPSClient in the commons-net library cannot transfer files over an FPTS connection to FileZilla Server v1.7.2.

       

      To reproduce, install FileZilla Server v1.7.2. Set Minimum Allows TLS version to 1.2. Use a self signed cert. Configure listener ports as necessary.

       

      Write a small Java program to that uses FTPSClient to connect to your FileZilla server.

       

      FTPSClient ftpsClient = new FTPSClient();
      ftpsClient.connect(hostname, port);
      ftpsClient.parsePBSZ(0L);
      ftpsClient.execPROT("P");
      ftpsClient.login(username,password);
      ftpsClient.enterLocalPassiveMode();
      ftpsClient.storeFile(file.getFileName().toString(), inputStream);
      

       

      The storeFile operation fails with "java.net.SocketException: Broken pipe".

      The FileZilla Server logs report this error:

      2023-07-12T12:33:25.852Z !! [FTP Session 3 127.0.0.1 tstellin] TLS session of data connection not resumed.
      2023-07-12T12:33:25.852Z << [FTP Session 3 127.0.0.1 tstellin] 425 Unable to build data connection: TLS session of data connection not resumed.

       

      I found a work-around that extends FTPSClient and overrides prepareDataSocket(Socket). You tie the TLS session from the control connection to the data connection. Unfortunately it uses reflection to get at private fields in SSLSessionContext, so it feels like a hack.

      This ticket requests that FPSClient be upgraded to re-use the TLS session from the control connection in the data connection.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tstellin Tobin Stelling
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: