shikhar/sshj — Issue #42: We should have an option to disable setting file attributes post-SFTP file transfer
Author: voberoi
Created: 2011-11-16 19:34:46+00:00
State: open

We're running into the following issue:

1. Client using sshj begins file transfer.
2. File entry appears on SFTP server.
3. Server process moves the file to another location as soon as it sees the file.
4. Client using sshj completes the file transfer.
5. Client using sshj sends command to set file attributes it sees locally on the remote file, but it doesn't exist at the same path on the server. Throws a "No such file" SFTPException.

It seems like sshj should either:

* Have the option to disable step 5.
* Separate these FTP commands. If someone needs to duplicate local file attributes, they should also send a request for that. If not, then they shouldn't be forced to.

See net.schmizz.sshj.sftp.SFTPFileTransfer.Uploader.upload(). engine.setAttributes() is what throws the SFTPException in step 5.