Only the first FTP post login command is ran!

Advertisement

cld09
Joined:
Posts:
4
Location:
Albany, NY

Only the first FTP post login command is ran!

I am running WinSCP Version 5.1.3 (Build 2881) on Windows 7. When I connect to an FTP site (via command line), I first need to supply a username and password for my organization's firewall. Once I supply the username and password, I am connected to the FTP site, but need to login to the FTP site. So, as you can see in the command-line example below, I type the command "USER", supply the username and password, and I have logged in successfully. To do this using WinSCP, I would supply "ftp.entsupport.symantec.com" (the FTP site I'm trying to connect to) as the host name, but for username and password I would supply my organization's firewall user and password. Of course, I need to specify the username and password for the FTP site itself. When doing this via command line, I had to type the command "USER". In WinSCP I would go to ENVIRONMENT -> FTP and specify the following two post login commands:

USER iosupport
PASS *****

The problem is that WinSCP only sends the first command ("USER iosupport") and not the second command (PASS *****). So, because of this, WinSCP cannot be used because the password is never sent. By the way, it looks as if WinSCP sends these post login commands as literals, so just typing "USER iosupport <password>" won't work. However, literals also work on command line, but again the problem here is that WinSCP doesn't even attempt to pass the second command.

COMMAND LINE EXAMPLE

C:\Users\cld09>ftp ftp.entsupport.symantec.com
Connected to exftpp.symantec.com.
220-My Organization's Firewall Authentication
220
User (exftpp.symantec.com:(none)): cld09
331-Password:
331
Password:
220-
220-
220 Symantec Secure FTP Server ready.
ftp> USER iosupport
331 Password required for iosupport.
Password:
230 Virtual user iosupport logged in.
ftp>

Reply with quote

Advertisement

cld09
Joined:
Posts:
4
Location:
Albany, NY

Re: Only the first FTP post login command is ran!

martin wrote:

You cannot use interactive commands in Post login commands. What USER is.

Okay, but I tested two other (non-interactive) post-login commands. It looks as if only the first post-login command is ran and any additional commands are ignored.

Reply with quote

cld09
Joined:
Posts:
4
Location:
Albany, NY

Re: Only the first FTP post login command is ran!

martin wrote:

Please post a complete session log file showing that.

1. Here is an example using command-line and sending the user and password via non-interactive literals. I issue the command "literal USER <username>" followed by "literal PASS <password>" and I am then logged in.

C:\Users\cld09\Desktop>ftp ftp.entsupport.symantec.com
Connected to exftpp.symantec.com.
220-***** Firewall Authentication
220
User (exftpp.symantec.com:(none)): cld09
331-Password:
331
Password:
220-
220-
220 Symantec Secure FTP Server ready.
ftp> literal USER iosupport
331 Password required for iosupport.
ftp> literal PASS *****
230 Virtual user iosupport logged in.
ftp>

2. Here is an example using WinSCP. Notice that "literal PASS <password>" is not sent. Please compare results of above example with this example. See also attached file "screenshot.png".

. 2013-01-28 08:37:31.114 --------------------------------------------------------------------------
. 2013-01-28 08:37:31.114 WinSCP Version 5.1.3 (Build 2881) (OS 6.1.7601 Service Pack 1)
. 2013-01-28 08:37:31.114 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2013-01-28 08:37:31.114 Local account: HEALTH1\cld09
. 2013-01-28 08:37:31.114 Working directory: C:\Program Files\WinSCP
. 2013-01-28 08:37:31.114 Command-line: "C:\Program Files\WinSCP\WinSCP.exe"
. 2013-01-28 08:37:31.114 Time zone: Current: GMT-5, Standard: GMT-5, DST: GMT-4, DST Start: 3/10/2013, DST End: 11/3/2013
. 2013-01-28 08:37:31.114 Login time: Monday, January 28, 2013 8:37:31 AM
. 2013-01-28 08:37:31.114 --------------------------------------------------------------------------
. 2013-01-28 08:37:31.114 Session name: cld09@ftp.entsupport.symantec.com (Modified stored session)
. 2013-01-28 08:37:31.114 Host name: ftp.entsupport.symantec.com (Port: 21)
. 2013-01-28 08:37:31.114 User name: cld09 (Password: Yes, Key file: No)
. 2013-01-28 08:37:31.114 Tunnel: No
. 2013-01-28 08:37:31.114 Transfer Protocol: FTP
. 2013-01-28 08:37:31.114 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2013-01-28 08:37:31.114 Proxy: none
. 2013-01-28 08:37:31.114 FTP: FTPS: None; Passive: Yes [Force IP: A]
. 2013-01-28 08:37:31.114 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2013-01-28 08:37:31.114 Cache directory changes: Yes, Permanent: Yes
. 2013-01-28 08:37:31.114 DST mode: 1
. 2013-01-28 08:37:31.114 --------------------------------------------------------------------------
. 2013-01-28 08:37:31.207 Connecting to ftp.entsupport.symantec.com ...
. 2013-01-28 08:37:31.270 Connected with ftp.entsupport.symantec.com. Waiting for welcome message...
< 2013-01-28 08:37:31.270 220-***** Firewall Authentication
< 2013-01-28 08:37:31.270 220
> 2013-01-28 08:37:31.270 USER cld09
< 2013-01-28 08:37:31.270 331-Password:
< 2013-01-28 08:37:31.270 331
> 2013-01-28 08:37:31.270 PASS *********
< 2013-01-28 08:37:31.613 220-
< 2013-01-28 08:37:31.613 220-
< 2013-01-28 08:37:31.613 220 Symantec Secure FTP Server ready.
> 2013-01-28 08:37:31.613 SYST
< 2013-01-28 08:37:31.675 530 Please login with USER and PASS.
> 2013-01-28 08:37:31.675 FEAT
< 2013-01-28 08:37:31.738 211-Extensions supported
< 2013-01-28 08:37:31.738 AUTH
< 2013-01-28 08:37:31.738 USER
< 2013-01-28 08:37:31.738 PASS
< 2013-01-28 08:37:31.738 QUIT
< 2013-01-28 08:37:31.738 PORT
< 2013-01-28 08:37:31.738 PASV
< 2013-01-28 08:37:31.738 EPSV
< 2013-01-28 08:37:31.738 TYPE
< 2013-01-28 08:37:31.738 STRU
< 2013-01-28 08:37:31.738 MODE
< 2013-01-28 08:37:31.738 RETR
< 2013-01-28 08:37:31.738 STOR
< 2013-01-28 08:37:31.738 ABOR
< 2013-01-28 08:37:31.738 DELE
< 2013-01-28 08:37:31.738 CWD
< 2013-01-28 08:37:31.738 XCWD
< 2013-01-28 08:37:31.738 LIST
< 2013-01-28 08:37:31.738 NLST
< 2013-01-28 08:37:31.738 SITE
< 2013-01-28 08:37:31.738 SYST
< 2013-01-28 08:37:31.738 STAT
< 2013-01-28 08:37:31.738 HELP
< 2013-01-28 08:37:31.738 NOOP
< 2013-01-28 08:37:31.738 MKD
< 2013-01-28 08:37:31.738 XMKD
< 2013-01-28 08:37:31.738 RMD
< 2013-01-28 08:37:31.738 XRMD
< 2013-01-28 08:37:31.738 PWD
< 2013-01-28 08:37:31.738 XPWD
< 2013-01-28 08:37:31.738 CDUP
< 2013-01-28 08:37:31.738 XCUP
< 2013-01-28 08:37:31.738 SIZE
< 2013-01-28 08:37:31.738 MDTM
< 2013-01-28 08:37:31.738 RNFR
< 2013-01-28 08:37:31.738 RNTO
< 2013-01-28 08:37:31.738 REST
< 2013-01-28 08:37:31.738 FEAT
< 2013-01-28 08:37:31.738 ADAT
< 2013-01-28 08:37:31.738 PROT
< 2013-01-28 08:37:31.738 PBSZ
< 2013-01-28 08:37:31.753 APPE
< 2013-01-28 08:37:31.753 XCRC
< 2013-01-28 08:37:31.753 CCC
< 2013-01-28 08:37:31.753 COMB
< 2013-01-28 08:37:31.753 UTF8
< 2013-01-28 08:37:32.034 211 END
> 2013-01-28 08:37:32.034 OPTS UTF8 ON
< 2013-01-28 08:37:32.096 500 'OPTS UTF8 ON': command not understood.
. 2013-01-28 08:37:32.143 Connected
. 2013-01-28 08:37:32.143 --------------------------------------------------------------------------
. 2013-01-28 08:37:32.143 Using FTP protocol.
. 2013-01-28 08:37:32.143 Doing startup conversation with host.

***** COMPARE THE FOLLOWING WITH THE FIRST EXAMPLE.

> 2013-01-28 08:37:32.206 USER iosupport
< 2013-01-28 08:37:32.268 331 Password required for iosupport.

***** NOTICE THE SECOND POST-LOGIN COMMAND WAS NOT SENT. HAD IT BEEN SENT, THE LOGIN WOULD HAVE BEEN SUCCESSFUL AS IT WAS IN THE ABOVE EXAMPLE.

. 2013-01-28 08:37:32.268 Getting current directory name.
> 2013-01-28 08:37:32.268 PWD
< 2013-01-28 08:37:32.346 530 Please login with USER and PASS.
* 2013-01-28 08:37:32.346 (ECommand) Error getting name of current remote directory.
* 2013-01-28 08:37:32.346 Authentication failed.
* 2013-01-28 08:37:32.346 Please login with USER and PASS.

screenshot.png

Reply with quote

Advertisement

Chetan_Savade
Guest

https://winscp.net/forum/posting.php?mode=reply&t=12053&sid=6

Hi,

Why don't you use Filezilla FTP client to connect FTP server

Regards,
Chetan Savade

Reply with quote

cld09
Joined:
Posts:
4
Location:
Albany, NY

Re: https://winscp.net/forum/posting.php?mode=reply&t=12053&sid=6

Chetan_Savade wrote:

Hi,

Why don't you use Filezilla FTP client to connect FTP server

Regards,
Chetan Savade

Thanks, but I was able to do what I needed to do via command-line. I prefer to use WinSCP, so I'm just trying to report this as a bug so it hopefully will be fixed in a future release. In the meantime, I can just use command-line when I need to do this process again.

Reply with quote

Advertisement

You can post new topics in this forum