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