WinSCP 5.0.9 cannot script FTP PUT file when using SOCKS

Advertisement

pabesco325
Guest

WinSCP 5.0.9 cannot script FTP PUT file when using SOCKS

Hi

I am using WinSCP 5.0.9.2578 on Windows Server 2008 (not RC2).

Here is what I am trying to do:

Run WinSCP under a batch script to upload a file using FTP through a SOCKS connection (using Vidalia for the proxy). For some reason I am able to log in but I get a timeout error when I try to PUT the file. I tried SOCKS4 and SOCKS5

Command invocation:
"C:\Program Files (x86)\WinSCP\winscp.exe" /passive=on /log=log.txt /xmllog=log.xml /console /script=upload.txt

Batch script "upload.txt":
option batch abort
option confirm off
open ftp://[USER]:[PASS]@[HOST]:[PORT] -rawsettings ProxyMethod=2 ProxyHost=127.0.0.1 ProxyPort=9050
lcd ./installers
cd /public_html/install
put -transfer=binary installer_505e2c64d7db8.php install.php
close
quit

Log file showing the timeout loop:
. 2012-09-23 05:58:26.513 --------------------------------------------------------------------------
. 2012-09-23 05:58:26.514 WinSCP Version 5.0.9 (Build 2578) (OS 6.0.6001 Service Pack 1)
. 2012-09-23 05:58:26.515 Configuration: C:\Program Files (x86)\WinSCP\WinSCP.ini
. 2012-09-23 05:58:26.515 Local account: WORKGROUP\VPS8000$
. 2012-09-23 05:58:26.515 Working directory: C:\wamp\www\panel
. 2012-09-23 05:58:26.515 Command-line: "C:\Program Files (x86)\WinSCP\winscp.exe"  /passive=on /log=log.txt /xmllog=log.xml /console /script=upload.txt
. 2012-09-23 05:58:26.515 Login time: Sunday, September 23, 2012 5:58:26 AM
. 2012-09-23 05:58:26.515 --------------------------------------------------------------------------
. 2012-09-23 05:58:26.515 Session name: [USER]@[HOST] (Ad-Hoc session)
. 2012-09-23 05:58:26.515 Host name: [HOST] (Port: 21)
. 2012-09-23 05:58:26.516 User name: [USER] (Password: Yes, Key file: No)
. 2012-09-23 05:58:26.516 Tunnel: No
. 2012-09-23 05:58:26.516 Transfer Protocol: FTP
. 2012-09-23 05:58:26.516 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2012-09-23 05:58:26.516 Proxy: SOCKS5
. 2012-09-23 05:58:26.516 HostName: 127.0.0.1 (Port: 9050); Username: ; Passwd: No
. 2012-09-23 05:58:26.516 FTP: FTPS: None; Passive: Yes [Force IP: A]
. 2012-09-23 05:58:26.516 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2012-09-23 05:58:26.516 Cache directory changes: Yes, Permanent: Yes
. 2012-09-23 05:58:26.516 DST mode: 1
. 2012-09-23 05:58:26.516 --------------------------------------------------------------------------
. 2012-09-23 05:58:26.520 Connecting to [HOST] ...
. 2012-09-23 05:58:27.946 Connected with [HOST]. Waiting for welcome message...
< 2012-09-23 05:58:28.328 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 2012-09-23 05:58:28.328 220-You are user number 1 of 50 allowed.
< 2012-09-23 05:58:28.328 220-Local time is now 05:58. Server port: 21.
< 2012-09-23 05:58:28.328 220-This is a private system - No anonymous login
< 2012-09-23 05:58:28.328 220 You will be disconnected after 15 minutes of inactivity.
> 2012-09-23 05:58:28.328 USER [USER]
< 2012-09-23 05:58:30.492 331 User [USER] OK. Password required
> 2012-09-23 05:58:30.492 PASS **********
< 2012-09-23 05:58:32.210 230 OK. Current restricted directory is /
> 2012-09-23 05:58:32.210 SYST
< 2012-09-23 05:58:33.121 215 UNIX Type: L8
> 2012-09-23 05:58:33.122 FEAT
< 2012-09-23 05:58:34.140 211-Extensions supported:
< 2012-09-23 05:58:34.140  EPRT
< 2012-09-23 05:58:34.140  IDLE
< 2012-09-23 05:58:34.140  MDTM
< 2012-09-23 05:58:34.140  SIZE
< 2012-09-23 05:58:34.140  MFMT
< 2012-09-23 05:58:34.140  REST STREAM
< 2012-09-23 05:58:34.140  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
< 2012-09-23 05:58:34.140  MLSD
< 2012-09-23 05:58:34.140  AUTH TLS
< 2012-09-23 05:58:34.140  PBSZ
< 2012-09-23 05:58:34.140  PROT
< 2012-09-23 05:58:34.140  ESTA
< 2012-09-23 05:58:34.140  PASV
< 2012-09-23 05:58:34.140  EPSV
< 2012-09-23 05:58:34.140  SPSV
< 2012-09-23 05:58:34.140  ESTP
< 2012-09-23 05:58:34.140 211 End.
. 2012-09-23 05:58:34.140 Connected
. 2012-09-23 05:58:34.140 --------------------------------------------------------------------------
. 2012-09-23 05:58:34.140 Using FTP protocol.
. 2012-09-23 05:58:34.143 Doing startup conversation with host.
> 2012-09-23 05:58:34.143 PWD
< 2012-09-23 05:58:35.349 257 "/" is your current location
. 2012-09-23 05:58:35.350 Getting current directory name.
. 2012-09-23 05:58:35.350 Startup conversation with host finished.
< 2012-09-23 05:58:35.350 Script: Active session: [1] [USER]@[HOST]
> 2012-09-23 05:58:35.350 Script: lcd ./installers
< 2012-09-23 05:58:35.350 Script: C:\wamp\www\panel\installers
> 2012-09-23 05:58:35.351 Script: cd /public_html/install
. 2012-09-23 05:58:35.351 Cached directory change via "/public_html/install" to "/public_html/install".
. 2012-09-23 05:58:35.351 Getting current directory name.
< 2012-09-23 05:58:35.351 Script: /public_html/install
> 2012-09-23 05:58:35.351 Script: put -transfer=binary installer_505e2c64d7db8.php install.php
. 2012-09-23 05:58:35.352 Copying 1 files/directories to remote directory "/public_html/install"
. 2012-09-23 05:58:35.352   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: install.php
. 2012-09-23 05:58:35.352   TM: B; ClAr: No; CPS: 0; InclM: 
. 2012-09-23 05:58:35.352   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2012-09-23 05:58:35.352 File: "installer_505e2c64d7db8.php"
. 2012-09-23 05:58:35.352 Copying "installer_505e2c64d7db8.php" to remote directory started.
. 2012-09-23 05:58:35.353 Binary transfer mode selected.
. 2012-09-23 05:58:35.353 Starting upload of installer_505e2c64d7db8.php
> 2012-09-23 05:58:35.353 CWD /public_html/install/
< 2012-09-23 05:58:36.615 250 OK. Current directory is /public_html/install
> 2012-09-23 05:58:36.615 PWD
< 2012-09-23 05:58:37.449 257 "/public_html/install" is your current location
> 2012-09-23 05:58:37.449 TYPE A
< 2012-09-23 05:58:38.760 200 TYPE is now ASCII
> 2012-09-23 05:58:38.761 PASV
< 2012-09-23 05:58:39.789 227 Entering Passive Mode (111,90,133,160,154,254)
. 2012-09-23 05:58:39.790 Error retrieving server address
> 2012-09-23 05:58:39.790 MLSD
. 2012-09-23 05:58:58.990 Timeout detected.
. 2012-09-23 05:58:58.990 Copying files to remote side failed.
. 2012-09-23 05:58:58.991 Connection was lost, asking what to do.
. 2012-09-23 05:58:58.991 Asking user:
. 2012-09-23 05:58:58.991 Lost connection. ("Error retrieving server address","Timeout detected.","Copying files to remote side failed.","Entering Passive Mode (111,90,133,160,154,254)")
< 2012-09-23 05:58:58.991 Script: Lost connection.
< 2012-09-23 05:58:58.991 Script: Error retrieving server address

< 2012-09-23 05:58:58.991 Timeout detected.

< 2012-09-23 05:58:58.991 Copying files to remote side failed.

That logfile loops like that forever.


Please help? Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: WinSCP 5.0.9 cannot script FTP PUT file when using SOCKS

Are you able to connect using an older version WinSCP or using any other FTP client? Can you post a log file showing that?

Reply with quote

Advertisement

You can post new topics in this forum