title: Can't get class project FTP server to send 226
body: <p>For a class project, I'm coding up a FTP client in Java (no external FTP libraries allowed) that can connect and grab files from a school FTP server.  For some reason, once a transfer is complete, the server will not send 226, nor will it close the connection from it's own end.  </p>
  
  <p>The only way to make the server send 226 is to close the InputStream from the client side manually, which seems unsafe in case since the client cannot be 100% sure when the file has finished transferring.  (Right now, InputStream's available() method is what's being used to check how far along the transfer is.)</p>
  
  <p>In the project specification, it says that we <strong>must</strong> follow RFC requirements where applicable for the subset of commands we are implementing.  The RFC states this:</p>
  
  <p><em>In general, it is the server's responsibility to maintain the data
        connection--to initiate it and to close it.  The exception to this
        is when the user-DTP is sending the data in a transfer mode that
        requires the connection to be closed to indicate EOF.  The server
        MUST close the data connection under the following conditions:
     1. The server has completed sending data in a transfer mode
              that requires a close to indicate EOF.
     2. The server receives an ABORT command from the user.
     3. The port specification is changed by a command from the
              user.
     4. The control connection is closed legally or otherwise.
     5. An irrecoverable error condition occurs.
        Otherwise the close is a server option, the exercise of which the
        server must indicate to the user-process by either a 250 or 226
        reply only.</em></p>
  
  <p>Is there something I'm missing here?</p>
  
  <p>EDIT: The server running is ProFTPD 1.3.0a Server.</p>