EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SimpleSFTPClient File Not Found

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#4142
Posted: 10/24/2007 15:00:09
by Joseph Rubio (Basic support level)
Joined: 08/28/2007
Posts: 7

I am using SimpleSFTPClient to connect to a SFTP server in the office. The connection to the server works just fine. My problem occurs when I try and send a file to server. I get an error saying file not found. This error occurs in the sample application as well as the version I am writing. I have attempted to use both the uploadstream and uploadfile methods and both return with the error mentioned above. Anyhelp with this error would be appreciated. Below is the code for my send function.

Public Function SendFile() As Boolean
Dim inF As IO.FileStream
inF = New System.IO.FileStream("C:\bsinv.txt", IO.FileMode.Open)

If SFTPClient.Active Then

Try
SFTPClient.UploadStream(inF, "Administrators/bsinv.txt", TSBSFTPFileTransferMode.ftmOverwrite)
'SFTPClient.UploadFile("C:\BSinv.txt", "Administrators/BSinv.txt")
Catch ex As Exception
MsgBox(Err.Number & "-" & Err.Description)
SendFile = False
End Try
SendFile = True
Else
SendFile = False
End If
End Function
#4143
Posted: 10/24/2007 15:18:15
by Eugene Mayevski (EldoS Corp.)

Your remote file name is not correct. You should provide the absolute path.


Sincerely yours
Eugene Mayevski
#4144
Posted: 10/24/2007 15:24:24
by Eugene Mayevski (EldoS Corp.)



Sincerely yours
Eugene Mayevski
#4145
Posted: 10/24/2007 15:24:46
by Joseph Rubio (Basic support level)
Joined: 08/28/2007
Posts: 7

This is the path on the server that the file should be put in. When I run the sample application that is the same path that is returned from your function to get the absolute path. Can you think of any other way I can check to make sure?
#4148
Posted: 10/25/2007 02:24:38
by Eugene Mayevski (EldoS Corp.)

XXX/Something can NOT be an absolute path. The absolute path always starts with a path separator.

If the server is buggy and doesn't report the path properly, we can't and shouldn't fix the path (we try to not change the data being transferred between the client and the application).


Sincerely yours
Eugene Mayevski
#4150
Posted: 10/25/2007 09:08:48
by Joseph Rubio (Basic support level)
Joined: 08/28/2007
Posts: 7

I appoligize I meant the absolute path is /Administrators/BSinv.txt as returned by your function. I have used this path and still get the same error. There is nothing wrong with the server as it is used by many of our clients to transfer files to us. Like I said the sample application provided returns the same error, but other SFTP clients transfer files without a problem. I need to get this to work so I can have my company purchase this software. Please help.
#4153
Posted: 10/25/2007 13:27:11
by Eugene Mayevski (EldoS Corp.)

Hmm. I am looking at your code and it's not correct. Are you actually using "/administrators/..." and the above code is not what you really have?

The error code is what the server reports, we pass it unchanged. So the problem is server-specific. We didn't get any similar reports before so we don't have a ready solution for you. Can you please check, what SFTP server software is the server running? This can be found in ServerSoftwareName property after the handshake is made.


Sincerely yours
Eugene Mayevski
#4155
Posted: 10/25/2007 14:18:18
by Joseph Rubio (Basic support level)
Joined: 08/28/2007
Posts: 7

1.36 SSHLIB: Globalscape is what is returned from the ServerSoftwareName Property.
#4156
Posted: 10/25/2007 15:43:11
by Joseph Rubio (Basic support level)
Joined: 08/28/2007
Posts: 7

I have figured out the issue. The specific user account I was using did not have write permisions. Thanks for the help, and sorry for wasting your time.
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 3012 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!