1

I get the error:

java.io.IOException: This server does not support operations to modify file attributes.
at com.sshtools.j2ssh.sftp.SftpSubsystemClient.getOKRequestStatus(Unknown Source)
at com.sshtools.j2ssh.sftp.SftpSubsystemClient.setAttributes(Unknown Source)
at com.sshtools.j2ssh.sftp.SftpSubsystemClient.changePermissions(Unknown Source)
at com.sshtools.j2ssh.SftpClient.chmod(Unknown Source)
at com.sshtools.j2ssh.SftpClient.put(Unknown Source)
at com.sshtools.j2ssh.SftpClient.put(Unknown Source)
at com.sshtools.j2ssh.SftpClient.put(Unknown Source)
at com.sshtools.j2ssh.SftpClient.put(Unknown Source)

After some digging I found out that the SftpClient.put command does an automatic chmod after it uploads a file. Is there a way for me to disable this?

I know for sure the initial .put works as expected because when I check the remote server for the file, it is present and all bytes accounted for.

simonshout
  • 95
  • 3
  • 14
  • There's possibly no solution. See related question http://stackoverflow.com/questions/16803245/sshtools-sftpclient-put-failing-with-no-such-file – Martin Prikryl Apr 30 '14 at 19:46
  • I've seen this thread. I assumed his problem was just as he stated, where his files are being removed shortly after a successful upload. Though the common issue of a chmod after upload is still evident. I really hope there is some sort of work around someone knows about. – simonshout May 01 '14 at 13:41
  • Issue resolved using Jsch library instead. – simonshout May 01 '14 at 17:00
  • 1
    Please post the resolution as an answer and accept it to close this question. Also consider upvoting my answer to the other question that suggests this solution :) – Martin Prikryl May 01 '14 at 17:20

0 Answers0