login about faq

My call to Chilkat.SFtp.UploadFileByName fails with this information in the LastErrorText:

    access: writeOnly
    createDisposition: createTruncate
    v3Flags: 0x1a
    Sent FXP_OPEN
    StatusResponseFromServer:
      Request: FXP_OPEN
      InformationReceivedFromServer:
        StatusCode: 2
        StatusMessage: No such file
      --InformationReceivedFromServer
    --StatusResponseFromServer

What is the problem? It seems I can upload using FileZilla or WSFTP.

asked Dec 27 '12 at 09:42

chilkat's gravatar image

chilkat ♦♦
11.8k316358421


It is a strange error. Here are a number of comments that can hopefully help.

1) It's not an error with opening the local file. The "no such file" error message is the error reply from the server in response to the file open/create request.

2) When using WSFTP or FileZilla, make sure you're actually using the SSH/SFTP protocol. Quite often, developers think they are doing the same thing, but are actually using the FTP protocol w/ these interactive tools.

3) When using WSFTP or FileZilla, make sure there are no automatic rules that switch the "home directory" to something else upon login.

4) Get your bearings on the server-side. Write test code to list the files in the HOME directory. Here is a VB6 example: http://www.example-code.com/vb/sftp_readDir.asp Do you see the files you expect to see?

5) Another way to get your bearings: Use the RealPath method to find out the absolute directory path on the server-side for ".", which would be the HOME directory of your user account. Here's a VB6 example: http://www.example-code.com/vb/sftp_realPath.asp

6) Maybe it's an error having to do with the access and createDisposition values used when opening the file. The UploadFileByName method does not give any alternate choices -- it uses the typical values one would need for creating/uploading a file. Test using the OpenFile method using different values, such as "readWrite" instead of "writeOnly". See the reference documentation for all possible values.

7) Maybe a file with the same name already exists, and permissions are such that you cannot overwrite it?

link

answered Dec 27 '12 at 09:42

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×201
×62
×4

Asked: Dec 27 '12 at 09:42

Seen: 3,175 times

Last updated: Dec 27 '12 at 09:42

powered by OSQA