title: Jsch renaming file fails
body: <p>I am uploading a large file by SFTP over Jsch. During the upload process, the old file should be available, so I'm uploading to a temp file and rename it to the new file. </p>
  
  <pre><code>final String tmpName = dest + "_tmp";
  channel.put(source, tmpName);
  channel.rename(tmpName, dest);
  </code></pre>
  
  <p>The upload is ok but the renaming fails:</p>
  
  <pre><code>ERROR: Failed to upload files
  4: Failure
  at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2491)
  at com.jcraft.jsch.ChannelSftp.rename(ChannelSftp.java:1665)
      ...
  </code></pre>
  
  <p>I can't figure out where the problem is. Please help</p>