I'm trying to create or truncate a file on the server (original code in FoxPro), but I'm getting the following response. I had changed the disposition to "createTruncate,deleteOnClose" when this started, and I removed deleteOnClose back out, but I am still receiving this message: SftpVersion: 3Actual code is as follows: lcTargetFile = lcServerName + lcFoldername + "FTPTEST.TXT"My handle at this point is an empty string, and the LastErrorText returns the above. Any hints or help would be greatly appreciated! |
The remote file path argument to OpenFile should be a relative path from the HOME directory of the SSH/SFTP user account. You probably don't want the server name in the path, and you probably don't want the path to begin with "/" (which would specify an absolute path on the remote server). I get the same response if I just use oSFTP.OpenFile("FTPTEST.TXT","readWrite","createTruncate"), except the remote path line is simply FTPTEST.TXT.
(Jun 23 '16 at 09:25)
BrianFarris
|
When a customer under support provides me with a login for such a problem, the first thing I do is to get my bearings -- immediately after authenticating, I run a snippet of code that fetches the HOME directory listing and shows the entries (files/sub-directories) that are present. If they don't match what I would expect to see, then... |