# ncftp connection problem



## PeterElderson (Dec 20, 2011)

Hi, thnx for helping me with the following problem: ncftpput cant't upload my data file.

I want to automate ftp exchange with a passive mode ftp-server from a Windows server. The Windows ftp-client does not support passive mode so I installed ncftp 3.2.5 for windows. 
Connecting with ncftp and transferring the file interactively is no problem:

>ncftp -u <user> -p <password> 145.21.158.148
NcFTP 3.2.5 (Jan 17, 2011) by Mike Gleason (http://www.NcFTP.com/contact/).
Resolving 145.21.158.148...
Connecting to 145.21.158.148...
Welcome to the DWRS07 FTP service.
Logging in...
Login successful.
Logging in...
Logged in to 145.21.158.148.
ncftp / > cd aanlever
Directory successfully changed.
ncftp /aanlever > mput c:\exports\ldif.data.ark
c:\exports\ldif.data.ark: 443.77 kB 1.39 MB/s
ncftp /aanlever >

Note: using put instea of mput results in the remote host cloding the connection.

Getting remote files back from the server using ncftp from a batch file is no problem:

C:\Exports\Rijksweb>echo on
C:\Exports\Rijksweb>ncftpget -R -u <user> -p <password> 145.21.158.148 c:\exp
orts\rijksweb /statistieken /trace-files /verwerkt /aanlever
...
...s\rijksweb\statistieken\stat.ark.201109012015.htm: 2.77 kB 17.73 kB/s
...
Could not traverse directory: could not parse extended file or directory informa
tion.
Could not traverse directory: could not parse extended file or directory informa
tion.
c:\exports\rijksweb\aanlever\ldif.data.ark: 443.77 kB 2.31 MB/s
C:\Exports\Rijksweb>pause
Press any key to continue . . .

The 2 errors simply mean that 2 of the the directories do not contain any files.

Now uploading a file using ncftpput:

C:\Exports\Rijksweb>echo on
C:\Exports\Rijksweb>ncftpput -u <user> -p <password> 145.21.158.148 /aanlever
c:\exports\ldif.data.ark
Could not read reply from control connection -- timed out.
ncftpput c:\exports\ldif.data.ark: timed out while waiting for server response.

It's problably something simple, but I not experienced with ftp so I would appreciate any help with this problem.


----------



## PeterElderson (Dec 20, 2011)

Hi folks, problem is solved. The firewall logging showed that an internal IP-address (for the backup network) was sent. The network configuration on that machine has been adapted, and now it works like a charm.


----------

