GUI works, Command Line fails FTPS

Advertisement

tubasol
Joined:
Posts:
3
Location:
South Texas

GUI works, Command Line fails FTPS

I have read through the forums for what seems like forever. The problem is I can't list the directories or get files from the ftps site in the command line mode. I can use the GUI by setting Passive and Force IP, and the GUI works great. I have already created an ini file based on my GUI settings and it still fails. Here is the script I am using.

winscp.com /script=TxEISBackup.txt /log=log.txt /ini=WinSCP.ini

The script is basic and just contains the open ftps site and the username and password

Here is my ini file settings for passive as created by GUI.
FSProtocol=5
FtpForcePasvIp=1
Ftps=3

The log file just shows it connecting as Passive with the private ip still. I connect just fine and can change directories, just can't get a dir or transfer any files.

Reply with quote

Advertisement

tubasol
Joined:
Posts:
3
Location:
South Texas

Re: GUI works, Command Line fails FTPS

martin wrote:

Please post a full log file showing the problem.

Here is the log file. I think the problem is the command line still isn't forcing the ip, as where I highlighted bold in the log.

. 2011-04-21 13:50:59.976 --------------------------------------------------------------------------
. 2011-04-21 13:50:59.976 WinSCP Version 4.3.2 (Build 1201) (OS 5.2.3790 Service Pack 2)
. 2011-04-21 13:50:59.976 Login time: Thursday, April 21, 2011 1:50:59 PM
. 2011-04-21 13:50:59.976 --------------------------------------------------------------------------
. 2011-04-21 13:50:59.976 Session name: ftp.txsuite.txeis.esc6.net|Franklin@ftp.txsuite.txeis.esc6.net
. 2011-04-21 13:50:59.976 Host name: ftp.txsuite.txeis.esc6.net (Port: 990)
. 2011-04-21 13:50:59.976 User name: ftp.txsuite.txeis.esc6.net|Franklin (Password: Yes, Key file: No)
. 2011-04-21 13:50:59.976 Tunnel: No
. 2011-04-21 13:50:59.976 Transfer Protocol: FTP
. 2011-04-21 13:50:59.976 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2011-04-21 13:50:59.976 Proxy: none
. 2011-04-21 13:50:59.976 FTP: FTPS: Implicit SSL/TLS; Passive: Yes [Force IP: No]
. 2011-04-21 13:50:59.976 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-04-21 13:50:59.976 Cache directory changes: Yes, Permanent: Yes
. 2011-04-21 13:50:59.976 DST mode: 1
. 2011-04-21 13:50:59.976 --------------------------------------------------------------------------
. 2011-04-21 13:51:00.258 Connecting to ftp.txsuite.txeis.esc6.net:990 ...
. 2011-04-21 13:51:00.539 Connected with ftp.txsuite.txeis.esc6.net:990, negotiating SSL connection...
. 2011-04-21 13:51:00.680 SSL connection established. Waiting for welcome message...
< 2011-04-21 13:51:00.680 220 Microsoft FTP Service
> 2011-04-21 13:51:00.680 USER ftp.txsuite.txeis.esc6.net|Franklin
< 2011-04-21 13:51:00.695 331 Password required for ftp.txsuite.txeis.esc6.net|Franklin.
> 2011-04-21 13:51:00.695 PASS ********
< 2011-04-21 13:51:00.726 230 User logged in.
> 2011-04-21 13:51:00.726 SYST
< 2011-04-21 13:51:00.742 215 Windows_NT
> 2011-04-21 13:51:00.742 FEAT
< 2011-04-21 13:51:00.773 211-Extended features supported:
< 2011-04-21 13:51:00.773 LANG EN*
< 2011-04-21 13:51:00.773 UTF8
< 2011-04-21 13:51:00.773 AUTH TLS;TLS-C;SSL;TLS-P;
< 2011-04-21 13:51:00.773 PBSZ
< 2011-04-21 13:51:00.773 PROT C;P;
< 2011-04-21 13:51:00.773 CCC
< 2011-04-21 13:51:00.773 HOST
< 2011-04-21 13:51:00.773 SIZE
< 2011-04-21 13:51:00.773 MDTM
< 2011-04-21 13:51:00.773 REST STREAM
< 2011-04-21 13:51:00.773 211 END
> 2011-04-21 13:51:00.773 OPTS UTF8 ON
< 2011-04-21 13:51:00.805 200 OPTS UTF8 command successful - UTF8 encoding now ON.
> 2011-04-21 13:51:00.805 PBSZ 0
< 2011-04-21 13:51:00.820 200 PBSZ command successful.
> 2011-04-21 13:51:00.820 PROT P
< 2011-04-21 13:51:00.836 200 PROT command successful.
. 2011-04-21 13:51:00.836 Connected
. 2011-04-21 13:51:00.836 --------------------------------------------------------------------------
. 2011-04-21 13:51:00.851 Using FTP protocol.
. 2011-04-21 13:51:00.851 Doing startup conversation with host.
> 2011-04-21 13:51:00.851 PWD
< 2011-04-21 13:51:00.867 257 "/" is current directory.
. 2011-04-21 13:51:00.867 Getting current directory name.
. 2011-04-21 13:51:00.867 Startup conversation with host finished.
< 2011-04-21 13:51:00.867 Script: Active session: [1] ftp.txsuite.txeis.esc6.net|Franklin@ftp.txsuite.txeis.esc6.net
> 2011-04-21 13:51:00.867 Script: cd franklin
. 2011-04-21 13:51:00.867 Cached directory change via "franklin" to "/franklin".
. 2011-04-21 13:51:00.867 Getting current directory name.
< 2011-04-21 13:51:00.867 Script: /franklin
> 2011-04-21 13:51:00.867 Script: lcd c:\TxEIS\
< 2011-04-21 13:51:00.867 Script: c:\TxEIS
> 2011-04-21 13:51:00.867 Script: get db*
. 2011-04-21 13:51:00.867 Retrieving directory listing...
> 2011-04-21 13:51:00.867 CWD /franklin/
< 2011-04-21 13:51:00.898 250 CWD command successful.
> 2011-04-21 13:51:00.898 PWD
< 2011-04-21 13:51:00.914 257 "/franklin" is current directory.
> 2011-04-21 13:51:00.914 TYPE A
< 2011-04-21 13:51:00.945 200 Type set to A.
> 2011-04-21 13:51:00.945 PASV
< 2011-04-21 13:51:00.961 227 Entering Passive Mode (10,8,6,126,196,13).
> 2011-04-21 13:51:00.961 LIST -a
< 2011-04-21 13:51:00.992 150 Opening ASCII mode data connection.
. 2011-04-21 13:51:15.992 Timeout detected.
. 2011-04-21 13:51:15.992 Could not retrieve directory listing

Reply with quote

martin
Site Admin
martin avatar

Re: GUI works, Command Line fails FTPS

Can you post a script file? When using GUI, are you using the same INI file?

Reply with quote

tubasol
Joined:
Posts:
3
Location:
South Texas

Re: GUI works, Command Line fails FTPS

martin wrote:

Can you post a script file? When using GUI, are you using the same INI file?

I don't have access to the server during the weekend. However, the script file only has the open command with the username and password attached, and then it calls a txt file to change director and get a couple files . The script is working from other environments as is, however their firewall isn't requiring to Force IP as this one is. It doesn't work if you do it manually either, by running winscp.com, without the script. Any time you try to put, get, or do a directory listing it errors as previously stated.

The INI file is the same as used by the GUI. I created the connection in the GUI, changed everything to correct settings, checked connection and that I could directory list(successful), and then exported the GUI settings to that INI as suggested.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: GUI works, Command Line fails FTPS

Tubasol wrote:

However, the script file only has the open command with the username and password attached
But you are not supposed to use any username/password in the script. You should use the stored session name.

Reply with quote

Advertisement

You can post new topics in this forum