sshj
sshj copied to clipboard
"This server does not support operations to modify file attributes."
Hi,
While transfering files through SFTP, we obtain this message from server : "This server does not support operations to modify file attributes."
The "put" command seems to work (we can see the file on the server) but the connexion closes juste after and the sftp.close() cannot be called. We understand that the library tries to modify file attributes (user rights or timestamps ?). Is it possible to prevent sshj from behaving like that ?
Many thanks by advance !
This happens when preserveAttributes is set to true (the default). You can turn this off with:
final var sftpClient = sshClient.newSFTPClient();
sftpClient.getFileTransfer().setPreserveAttributes(false);