Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
880 views
in .NET FTP by (320 points)

My virtual file system (streams files from the database) works for most clients.  However, when using the Pscp client, I get a '{file} is a directory' message when attempting to download a file. If I put an actual file on disk and use the operating systems' file system, it works correctly. I believe the difference is in the handling of the SSH_FXP_STAT command.

The CompleteFTP logs show different attributes for the SSH_FXP_ATTRS response.

Success case (file is actually on disk)

Attributes: Valid flags=13, US=, G=, D=False, F=True, LI=False, R=True, W=True, AT=0, AD=1/1/1970 12:00:00 AM, MT=1371173460, MD=6/14/2013 1:31:00 AM, P=33188, S=12515, U=-rw-r--r-- 

Failure case (virtual file system)

Attributes: Valid flags=13, US=, G=, D=True, F=False, LI=False, R=True, W=True, AT=0, AD=01/01/1970 12:00:00 AM, MT=1446216985, MD=30/10/2015 2:56:25 PM, P=16877, S=0, U=drwxr-xr-x 

I'm assuming the D=True is causing my problem, but I don't see a way to change the behaviour through the API

Other clients don't appear to have this problem because they go straight to the SSH_FXP_OPEN instead of asking for the status.

Thanks

by (162k points)
Yes, the D=true is certainly causing your issue, but we won't be able to tell what's going on without looking at your source and a Debug level log file. It is best to open a support ticket and attach the source and zipped log (http://enterprisedt.com/support/index.php).

1 Answer

0 votes
by (51.6k points)
Note: This issue was moved to our helpdesk system due to the need to exchange logs containing confidential data.

The cause of this problem turned out to be that the DirectoryExists method was returning true for files as well as directories.  This caused CompleteFTP to conclude that the file in question was a directory, which then caused the error described.

Categories

...