Uploaded image for project: 'FtpServer'
  1. FtpServer
  2. FTPSERVER-327

breaking RFC by replying 150 after establishing data connection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.0.2
    • None
    • Server
    • None
    • RHEL3

    Description

      Hi,

      RFC 959 explains 125 and 150 (valid intermediate responses for STOR/RETR) as follows:
      125 Data connection already open; transfer starting.
      150 File status okay; about to open data connection.
      If the data connection is already estabilished and after it the server receives STOR/RETR then it should respond with 125. I connected in passive mode using my custom client to verify this. I first estabilished a data channel and after it only I sent STOR but still got 150 which is wrong.

      Following is part of my code :
      data = new Socket(pasv_ip, pasv_port);
      data_os = data.getOutputStream();
      data_is = data.getInputStream();
      control_os.print("STOR " + "file.txt" + "\r\n");
      System.out.print("---> STOR " + "file.txt" + "\n");
      control_os.flush();
      System.out.println(control_is.readLine());

      However if I tried sending STOR before establishing data channel then also I received 150 which seems ok as per RFC.

      Regards,
      Parijat Bansal

      Attachments

        Activity

          People

            Unassigned Unassigned
            bansalparijat Parijat Bansal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: