Getting "Permission Denied" when calling SetFileDateTime. What permissions are needed to resolve this error?
Using Rebex SFTP for .NET (Version 2.0.3723.0) for .NET 1.1
LogWriter output:
13:12:53.156 Verbose SSH: Sending packet SSH_MSG_CHANNEL_DATA (94 bytes).
5E-00-00-00-00-00-00-00-55-00-00-00-51-09-00-00-00-1C-00-00-00-3C-2F-77
77-77-2F-63-6F-6E-74-65-6E-74-2E-6E-77-63-74-2E-6F-72-67-2F-68-74-64-6F
63-73-2F-70-72-6F-67-72-61-6D-6D-69-6E-67-2F-73-63-68-65-64-75-6C-65-74
69-74-6C-65-2E-73-68-74-6D-6C-00-00-00-08-4A-6B-B7-11-4A-6B-B7-11
13:12:53.406 Info Command: SSH_FXP_SETSTAT ('/www/content/htdocs/web.gif')
13:12:53.625 Verbose SSH: Received packet SSH_MSG_CHANNEL_DATA (47 bytes).
5E-00-00-00-00-00-00-00-26-00-00-00-22-65-00-00-00-1C-00-00-00-03-00-00
00-11-50-65-72-6D-69-73-73-69-6F-6E-20-64-65-6E-69-65-64-00-00-00-00
13:12:53.843 Info Response: SSH_FXP_STATUS (3, 'Permission denied')
Output from Debug.WriteLine:
SetFileDateTime: Local=C:\Inetpub\wwwroot\web.gif Remote=/www/content/htdocs/web.gif 07/21/2001 3:22:32 PM
Source Code:
Sub UpdateRemoteTimeStamp(
ByVal strLocalPath As String,
ByVal strRemotePath As String)
Dim dtLastWrite As DateTime = File.GetLastWriteTime(strLocalPath)
Debug.WriteLine("SetFileDateTime: " &
" Local=" & strLocalPath &
" Remote=" & strRemotePath & " " & _
dtLastWrite)
_sftp.SetFileDateTime(strRemotePath, dtLastWrite)
End Sub