# EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
 #28401 Posted: 02/13/2014 08:59:39 by Eugene Mayevski (EldoS Corp.)
I don't think that the issue can be solved by re-instantiating the client, also this will mean a separate SSH connection for each file. But as a last resort you can try this - maybe the server can be tricked this way and it will give you complete files.

Sincerely yours
Eugene Mayevski
 #28402 Posted: 02/13/2014 09:22:36 by Peder Skanning (Basic support level) Joined: 02/26/2013 Posts: 22

./2014-158_E-ARKIV.AFP
 #28403 Posted: 02/13/2014 09:25:46 by Eugene Mayevski (EldoS Corp.)
Nope. The absolute path most often starts with a path separator (slash), though Windows servers sometimes also accept windows absolute paths (like C:\path\to\file.ext).

You can use RequestAbsolutePath method to convert the initial relative path (eg. your home directory) to the absolute path.

Sincerely yours
Eugene Mayevski
 #28404 Posted: 02/13/2014 09:50:23 by Peder Skanning (Basic support level) Joined: 02/26/2013 Posts: 22
I am now allmost certain, that the SFTP Server is the problem. When I build a list of files with ReadDirectory:
Code
            ArrayList aListing = new ArrayList();             byte[] handle = _simpleClient.OpenDirectory("./");             _simpleClient.ReadDirectory(handle, aListing);             if (aListing.Count > 0)             {                 foreach (object t in aListing)                 {                     _currentFileList.Add(t);                 }             } 

i also get the filesize. This filesize, the first filesize reported in the log does not correspond with the filesize reported through On_Progress.
Also as you can se from this log, the filesize differs on three consequtive runs:
Quote
02/13/2014 16:42:05 - TSIconsole started
02/13/2014 16:42:06 - Server key received and validated OK.
02/13/2014 16:42:07 - Transfer All
02/13/2014 16:42:52 - TSIconsole started
02/13/2014 16:42:53 - Server key received and validated OK.
02/13/2014 16:42:54 - Transfer All
02/13/2014 16:43:21 - TSIconsole started
02/13/2014 16:43:22 - Server key received and validated OK.
02/13/2014 16:43:23 - Transfer All

I think I have to stop here and contact the supplyer

In a previous posting you write:
Quote
First, you are using relative path names for remote paths, which is a very bad idea, because SFTP doesn't have a concept of current directory and god knows what you are requesting when using relative paths.

The only way I can get the path to work is by starting the path with "./" The SFTP Server runs on a IBM Mainframe.
 #28405 Posted: 02/13/2014 10:08:22 by Eugene Mayevski (EldoS Corp.)
Quote
Peder Skanning wrote:
The only way I can get the path to work is by starting the path with "./" The SFTP Server runs on a IBM Mainframe.

Did you try using RequestAbsolutePath method? Did it return anything meaningful?

I can imagine that mainframes' servers do things in a different ways from common system, so it's possible, for example, that they give you access only to "current" (in their understanding) directory.

Quote
Peder Skanning wrote:
i also get the filesize. This filesize, the first filesize reported in the log does not correspond with the filesize reported through On_Progress.

ListDirectory uses directory reading command. DownloadFile determines the size of the file using RequestAttributes method. What you can do is call those two methods and compare sizes. If sizes are different, then you need to complain to the server admins.

Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

### Statistics

Topic viewed 4864 times

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

|