SFTP Permission Denied on OpenFile
Question:
I’m getting error after sftp.OpenFile() call
OpenFile: DllDate: Nov 27 2008 UnlockPrefix: Anything for 30-day trial Username: chilkat Component: .NET 2.0 SshVersion: SSH-2.0-5.3.3.56 SSH Tectia Server SftpVersion: 3 hcCurDate: Fri, 28 Nov 2008 09:53:46 +0200 hcExpire: 1/2009 filename: sftp_test.txt access: writeOnly createDisposition: openOrCreate v3Flags: 0xa Sent FXP_OPEN [SSH] Received IGNORE message StatusCode: 3 ErrorMessage: Permission denied, file: sftp_test.txt SshLog: SFTP> Sending SSH_FXP_OPEN
Answer:
The “Permission denied, file: sftp_test.txt” message is what comes back
from the SFTP server. The filename has no path part, so you’re trying to
open/create a file in the home directory of the SFTP user account used in the authentication.
(AuthenticatePw method I assume?)
Try providing an absolute filepath instead. Also, perhaps try “readWrite” instead
of “writeOnly”.
admin
0
Tags :