SFTP SetAttributes() issue

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
RJ
Posts: 3
Joined: Tue 08 Sep 2009 18:05

SFTP SetAttributes() issue

Post by RJ » Tue 08 Sep 2009 18:14

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 10 Sep 2009 07:51

I could not reproduce the problem. Please send me a complete small sample to dmitryg*devart*com to demonstrate it.

RJ
Posts: 3
Joined: Tue 08 Sep 2009 18:05

Post by RJ » Thu 10 Sep 2009 12:38

A small example project has been sent. I've only tried it against OpenSSH server running on Ubuntu (latest version).

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 14 Sep 2009 11:27

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:

Code: Select all

attr.ValidAttributes := attr.ValidAttributes - [aAccessTime];

RJ
Posts: 3
Joined: Tue 08 Sep 2009 18:05

Post by RJ » Tue 15 Sep 2009 10:49

That worked. Thank you!

Post Reply