Connection Time Out - Not setting directory

Advertisement

jph_parkseed
Joined:
Posts:
1
Location:
South Carolina

Connection Time Out - Not setting directory

I am using WinSCP in a C# program that acts a central processor for multiple FTP servers we send data to. Two of the sites work fine, but with the third I am getting a connection lost error.

The way this company set up their FTP site they only allow a file to be transferred to a specific folder. For example:
/parkseed_0000/in
root, and parkseed_000 are read only, in has write permissions. I captured both session and debug files for review, but here is the put line

> 2024-05-30 12:34:21.969 Script: put -delete -nopermissions -preservetime -transfer="binary" -- "c:\temp\Marketing\Wiland\PS\PS New Customers_20240530.csv" "/ParkSeedCompany_5919/in" 
Note that the remote directory is absolute.
A few lines later this is written in the file:
. 2024-05-30 12:34:21.970 Starting upload of c:\temp\Marketing\Wiland\PS\PS New Customers_20240530.csv
> 2024-05-30 12:34:21.970 CWD /ParkSeedCompany_5919
< 2024-05-30 12:34:22.050 250 Command CWD succeed
> 2024-05-30 12:34:22.050 PWD
< 2024-05-30 12:34:22.112 257 "/ParkSeedCompany_5919" is current directory
> 2024-05-30 12:34:22.112 TYPE I
< 2024-05-30 12:34:22.174 200 Transfer mode set to BINARY
> 2024-05-30 12:34:22.174 PASV
What seems to be happening is that WinSCP is only getting to the parent folder, not the in folder and since that is read only, the command fails.

I read in other forums that WinSCP API uses absolute directory paths, but what it looks like internally is that it loops down the path. I did try this using the GUI app to see if I got any other kind of error and I did:
Disconnected from server
Could not retrieve directory listing
Error listing directory '/ParkSeedCompany_5919/in'.
One other path I tried was using a bat file and cmd commands (see file) and I had it switch folders to get to in and still could not transfer a file:
PS New Customers_20240530 |            0 B |    0.0 KB/s | binary |   0%
Lost connection.
Disconnected from server
Copying files to remote side failed.
I also tried accessing the site using Filzilla and from their UI I was able to get to that in directory and manually move up a file. However I need a programatic way to transfer files. Is there a setting I'm missing or needing that allows the API to move a file.
Description: Simple bat file to test connection to FTP Site via command line script

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,041
Location:
Prague, Czechia

Re: Connection Time Out - Not setting directory

I cannot tell now, if it is the only problem you have. But in any case, if you want to upload files to /ParkSeedCompany_5919/in folder, you need to:
If this does not help, please post new log. Also a log file from FileZilla might be useful too.

Reply with quote

Advertisement

You can post new topics in this forum