When trying to use the ScSFTPClient.SetAttributes() function I get the following exception: class EScError ... "Timeout expired, SFTP server have not responded".
The timeout value is set to 15 and the error occur immediately after calling the function.
I've tried ScSFTPClient.SetAttributesByHandle() as well and with the same result.
SFTP SetAttributes() issue
This problem is arisen because OpenSSH server closes the connection with SFTP client when receiving the command to change specified attributes.
To solve this probelm, you should add the following code before calling the SetAttributes method:
To solve this probelm, you should add the following code before calling the SetAttributes method:
Code: Select all
attr.ValidAttributes := attr.ValidAttributes - [aAccessTime];