SFTP File not Found

Question:

I’m trying to open a file on the SFTP server, but I get a “File not Found” error?
Here is the LastErrorText:

ChilkatLog:
 OpenFile:
   DllDate: Dec  2 2009
   UnlockPrefix: Anything for 30-day trial
   Username: IUSR_ABC***
   Component: ActiveX
   SshVersion: SSH-2.0-1.36 sshlib: GlobalScape
   SftpVersion: 3
   hcCurDate: Tue, 08 Dec 2009 13:48:25 +0000
   hcExpire: 1/2010
   filename: test.txt
   access: writeOnly
   createDisposition: createTruncate
   v3Flags: 0x1a
   Sent FXP_OPEN
   StatusResponse:
     Request: FXP_OPEN
     StatusCode: 2
     StatusMessage: File not found
   SshLog: SFTP> Sending SSH_FXP_OPEN
TRAN> CHANNEL_DATA
TRAN* NumBytes: 45
TRAN< CHANNEL_DATA
SFTP< Received SSH_FXP_STATUS

   Failed.


Answer:

You passed “test.txt” to OpenFile, which means you’re trying to open that file in the HOME directory of the SSH/SFTP user account. To solve the problem, you should either pass the full absolute filepath of the file you wish to open, or a relative filepath from the HOME directory of the SSH user account.