run command/script after login

Advertisement

tp
Guest

run command/script after login

Hi all,
I would like to know if it's possible to issue a command automatically after login?
I need to do this and currently I'm using "CoreFTP lite" which supports this.

Regards
Thomas

Reply with quote

Advertisement

tp
Guest

Re: run command/script after login

It seems so.
In my case I'm connecting to a kind of mainframe with a proprietary os.
To get to the unix shell after login a simple command has to be issued.
It would be great if this could be included and I could use winSCP for all tasks - and don't have to use the undhandy coreFTP ;-)

Regards

Reply with quote

martin
Site Admin
martin avatar

Re: run command/script after login

tp wrote:

To get to the unix shell after login a simple command has to be issued.
What do you expect WinSCP to do with the prompt?

Reply with quote

Guest

Re: run command/script after login

martin wrote:

What do you expect WinSCP to do with the prompt?
I'm not sure if I understand your question.
In my case I'm login to a HP Nonstop server (aka Tandem). This server has the proprietary GUARDIAN file system. But it also provides a unix like file system called OSS. To get to this, after login a command "oss" has to be issued. After this WinSCP should be able to list the directory contents.
When I manually issue the command via Commands/Open Terminal it works.

Regards

Reply with quote

Advertisement

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

Re: run command/script after login

In my case I'm login to a HP Nonstop server (aka Tandem). This server has the proprietary GUARDIAN file system. But it also provides a unix like file system called OSS. To get to this, after login a command "oss" has to be issued. After this WinSCP should be able to list the directory contents.
OK, understood.

Reply with quote

Guest

Re: run command/script after login

Hi Martin,
I have tried the new beta, but somehow it doesn't work as expected.
When I define the oss command in the new post-login section, it's not able to list the oss directories. If I don't put it there and issue it manually after login it still works.
Regards
Thomas

Reply with quote

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

Re: run command/script after login

I have tried the new beta, but somehow it doesn't work as expected.
When I define the oss command in the new post-login section, it's not able to list the oss directories. If I don't put it there and issue it manually after login it still works.
Can you post a log file?

Reply with quote

Guest

Re: run command/script after login

. 2008-04-09 14:37:34.125 --------------------------------------------------------------------------
. 2008-04-09 14:37:34.125 WinSCP Version 4.1.0 (Build 375) (OS 5.1.2600 Service Pack 2)
. 2008-04-09 14:37:34.125 Login time: Mittwoch, 9. April 2008 14:37:34
. 2008-04-09 14:37:34.125 --------------------------------------------------------------------------
. 2008-04-09 14:37:34.125 Session name: XXXXXXXXXX
. 2008-04-09 14:37:34.125 Host name: XXXXXXXXX (Port: 21)
. 2008-04-09 14:37:34.125 User name: XXXXX (Password: Yes, Key file: No)
. 2008-04-09 14:37:34.125 Tunnel: No
. 2008-04-09 14:37:34.125 Transfer Protocol: FTP
. 2008-04-09 14:37:34.125 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2008-04-09 14:37:34.125 Proxy: none
. 2008-04-09 14:37:34.125 FTP: Passive: No
. 2008-04-09 14:37:34.125 Local directory: default, Remote directory: /, Update: No, Cache: Yes
. 2008-04-09 14:37:34.125 Cache directory changes: Yes, Permanent: Yes
. 2008-04-09 14:37:34.125 DST mode: 1
. 2008-04-09 14:37:34.125 --------------------------------------------------------------------------
. 2008-04-09 14:37:34.359 Connecting to XXXXXX...
. 2008-04-09 14:37:34.453 FtpControlSocket.cpp(1056): OnConnect(0)  OpMode=1 OpState=-1   caller=0x01d754e8
. 2008-04-09 14:37:34.453 Connected with XXXXX Waiting for welcome message...
. 2008-04-09 14:37:34.484 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-1   caller=0x01d754e8
< 2008-04-09 14:37:34.484 220 XXXX FTP SERVER T9552H02 (Version H02 TANDEM 15OCT2007) ready.
> 2008-04-09 14:37:34.484 USER XXXX
. 2008-04-09 14:37:34.562 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=0   caller=0x01d754e8
< 2008-04-09 14:37:34.562 331 Password required for XXXXXX.
> 2008-04-09 14:37:34.562 PASS **********
. 2008-04-09 14:37:34.578 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=3   caller=0x01d754e8
< 2008-04-09 14:37:34.578 230 User XXXXX logged in.  GUARDIAN API enabled
> 2008-04-09 14:37:34.578 SYST
. 2008-04-09 14:37:34.593 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-14   caller=0x01d754e8
< 2008-04-09 14:37:34.593 215 Nonstop H-series Server : H06.12.
> 2008-04-09 14:37:34.593 FEAT
. 2008-04-09 14:37:34.593 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-13   caller=0x01d754e8
< 2008-04-09 14:37:34.593 500 'FEAT': command not understood.
. 2008-04-09 14:37:34.593 Connected
. 2008-04-09 14:37:34.593 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=1 OpState=-13   caller=0x01d754e8
. 2008-04-09 14:37:34.593 Got reply 1 to the command 1
. 2008-04-09 14:37:34.593 --------------------------------------------------------------------------
. 2008-04-09 14:37:34.593 Using FTP protocol.
. 2008-04-09 14:37:34.593 Doing startup conversation with host.
. 2008-04-09 14:37:34.593 FtpControlSocket.cpp(1269): FtpCommand(oss)  OpMode=0 OpState=-1   caller=0x01d754e8
> 2008-04-09 14:37:34.593 oss
. 2008-04-09 14:37:34.593 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d754e8
< 2008-04-09 14:37:34.593 257 OSS API enabled.
. 2008-04-09 14:37:34.593 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d754e8
. 2008-04-09 14:37:34.593 Got reply 1 to the command 16
. 2008-04-09 14:37:34.593 FtpControlSocket.cpp(1269): FtpCommand(PWD)  OpMode=0 OpState=-1   caller=0x01d754e8
> 2008-04-09 14:37:34.593 PWD
. 2008-04-09 14:37:34.609 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d754e8
< 2008-04-09 14:37:34.609 257 "/G/XXX/XXXX" is current directory.
. 2008-04-09 14:37:34.609 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d754e8
. 2008-04-09 14:37:34.609 Got reply 1 to the command 16
. 2008-04-09 14:37:34.609 Changing directory to "/".
. 2008-04-09 14:37:34.609 FtpControlSocket.cpp(1269): FtpCommand(CWD /)  OpMode=0 OpState=-1   caller=0x01d754e8
> 2008-04-09 14:37:34.609 CWD /
. 2008-04-09 14:37:34.656 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d754e8
< 2008-04-09 14:37:34.656 250 CWD command successful.
. 2008-04-09 14:37:34.656 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d754e8
. 2008-04-09 14:37:34.656 Got reply 1 to the command 16
. 2008-04-09 14:37:34.656 Getting current directory name.
. 2008-04-09 14:37:34.656 FtpControlSocket.cpp(1269): FtpCommand(PWD)  OpMode=0 OpState=-1   caller=0x01d754e8
> 2008-04-09 14:37:34.656 PWD
. 2008-04-09 14:37:34.734 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d754e8
< 2008-04-09 14:37:34.734 257 "/" is current directory.
. 2008-04-09 14:37:34.734 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d754e8
. 2008-04-09 14:37:34.734 Got reply 1 to the command 16
. 2008-04-09 14:37:34.734 FtpControlSocket.cpp(1276): List(FALSE,0,"/","",1)  OpMode=0 OpState=-1   caller=0x01d754e8
. 2008-04-09 14:37:34.734 Retrieving directory listing...
> 2008-04-09 14:37:34.750 TYPE A
. 2008-04-09 14:37:34.750 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=8   caller=0x01d754e8
< 2008-04-09 14:37:34.750 200 Type set to A.
. 2008-04-09 14:37:34.750 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=8   caller=0x01d754e8
> 2008-04-09 14:37:34.765 PORT XXXXXXXXX
. 2008-04-09 14:37:34.765 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=7   caller=0x01d754e8
< 2008-04-09 14:37:34.765 200 PORT command successful.
. 2008-04-09 14:37:34.765 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=7   caller=0x01d754e8
. 2008-04-09 14:37:34.765 TransferSocket.cpp(597): SetActive()   caller=0x01d7381c
> 2008-04-09 14:37:34.765 LIST -a
. 2008-04-09 14:37:34.812 TransferSocket.cpp(418): OnAccept(0)   caller=0x01d7381c
. 2008-04-09 14:37:34.812 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=9   caller=0x01d754e8
< 2008-04-09 14:37:34.812 150 Opening data connection for /bin/ls (XXXXXXXX,4630d) (0 bytes).
. 2008-04-09 14:37:34.812 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=9   caller=0x01d754e8
. 2008-04-09 14:37:34.812 TransferSocket.cpp(557): OnClose(0)   caller=0x01d7381c
. 2008-04-09 14:37:34.812 TransferSocket.cpp(1179): Close()   caller=0x01d7381c
. 2008-04-09 14:37:34.812 TransferSocket.cpp(1179): Close()   caller=0x01d7381c
. 2008-04-09 14:37:34.812 FtpControlSocket.cpp(2070): TransferEnd(4)  OpMode=4 OpState=10   caller=0x01d754e8
. 2008-04-09 14:37:34.812 FtpControlSocket.cpp(1276): List(TRUE,0,"","",0)  OpMode=4 OpState=10   caller=0x01d754e8
. 2008-04-09 14:37:34.812 -a not found
. 2008-04-09 14:37:34.812 TransferSocket.cpp(108): ~CTransferSocket()   caller=0x01d7381c
. 2008-04-09 14:37:34.812 TransferSocket.cpp(1179): Close()   caller=0x01d7381c
. 2008-04-09 14:37:34.953 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=10   caller=0x01d754e8
< 2008-04-09 14:37:34.953 226 Transfer Complete.
. 2008-04-09 14:37:34.953 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=10   caller=0x01d754e8
. 2008-04-09 14:37:34.953 Directory listing successful
. 2008-04-09 14:37:34.953 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=4 OpState=10   caller=0x01d754e8
. 2008-04-09 14:37:34.953 Got reply 1 to the command 2
. 2008-04-09 14:37:34.953 Startup conversation with host finished.
. 2008-04-09 14:37:37.000 Session upkeep

Reply with quote

Advertisement

Guest

The funny thing is that after it says "OSS API enabled",
it still returns /G/XXX/XXXX as current directory which is from the guardian file system...

Reply with quote

martin
Site Admin
martin avatar

Re: run command/script after login

OK, so can you post a log file of session where you specify oss command from console window?

Reply with quote

Guest

Re: run command/script after login

This a normal login with manually issued command oss
. 2008-04-17 11:09:11.500 --------------------------------------------------------------------------
. 2008-04-17 11:09:11.500 WinSCP Version 4.1.0 (Build 375) (OS 5.1.2600 Service Pack 2)
. 2008-04-17 11:09:11.500 Login time: Donnerstag, 17. April 2008 11:09:11
. 2008-04-17 11:09:11.500 --------------------------------------------------------------------------
. 2008-04-17 11:09:11.500 Session name: XXXXXXXXXXXXX
. 2008-04-17 11:09:11.500 Host name: XXXXXX (Port: 21)
. 2008-04-17 11:09:11.500 User name: XXXXXXX (Password: Yes, Key file: No)
. 2008-04-17 11:09:11.500 Tunnel: No
. 2008-04-17 11:09:11.500 Transfer Protocol: FTP
. 2008-04-17 11:09:11.500 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2008-04-17 11:09:11.500 Proxy: none
. 2008-04-17 11:09:11.500 FTP: Passive: No
. 2008-04-17 11:09:11.500 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2008-04-17 11:09:11.500 Cache directory changes: Yes, Permanent: Yes
. 2008-04-17 11:09:11.500 DST mode: 1
. 2008-04-17 11:09:11.500 --------------------------------------------------------------------------
. 2008-04-17 11:09:11.593 Connecting to XXXXXXX ...
. 2008-04-17 11:09:11.609 FtpControlSocket.cpp(1056): OnConnect(0)  OpMode=1 OpState=-1   caller=0x01d849f4
. 2008-04-17 11:09:11.609 Connected with XXXXXXXXX. Waiting for welcome message...
. 2008-04-17 11:09:11.640 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-1   caller=0x01d849f4
< 2008-04-17 11:09:11.640 220 XXXX FTP SERVER T9552H02 (Version H02 TANDEM 15OCT2007) ready.
> 2008-04-17 11:09:11.640 USER XXXXXX
. 2008-04-17 11:09:11.718 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=0   caller=0x01d849f4
< 2008-04-17 11:09:11.718 331 Password required for XXXXX.
> 2008-04-17 11:09:11.718 PASS ********
. 2008-04-17 11:09:11.734 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=3   caller=0x01d849f4
< 2008-04-17 11:09:11.734 230 User XXXXXXX logged in.  GUARDIAN API enabled
> 2008-04-17 11:09:11.734 SYST
. 2008-04-17 11:09:11.734 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-14   caller=0x01d849f4
< 2008-04-17 11:09:11.734 215 Nonstop H-series Server : H06.12.
> 2008-04-17 11:09:11.734 FEAT
. 2008-04-17 11:09:11.734 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=1 OpState=-13   caller=0x01d849f4
< 2008-04-17 11:09:11.734 500 'FEAT': command not understood.
. 2008-04-17 11:09:11.734 Connected
. 2008-04-17 11:09:11.734 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=1 OpState=-13   caller=0x01d849f4
. 2008-04-17 11:09:11.734 Got reply 1 to the command 1
. 2008-04-17 11:09:11.734 --------------------------------------------------------------------------
. 2008-04-17 11:09:11.734 Using FTP protocol.
. 2008-04-17 11:09:11.734 Doing startup conversation with host.
. 2008-04-17 11:09:11.734 FtpControlSocket.cpp(1269): FtpCommand(PWD)  OpMode=0 OpState=-1   caller=0x01d849f4
> 2008-04-17 11:09:11.734 PWD
. 2008-04-17 11:09:11.750 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d849f4
< 2008-04-17 11:09:11.750 257 "\XXX.XXXXXXX" is current default.
. 2008-04-17 11:09:11.750 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d849f4
. 2008-04-17 11:09:11.750 Got reply 1 to the command 16
. 2008-04-17 11:09:11.750 Getting current directory name.
. 2008-04-17 11:09:11.750 FtpControlSocket.cpp(1276): List(FALSE,0,"/XXX.XXXXXXX/XXX.XXXXXXX/","",1)  OpMode=0 OpState=-1   caller=0x01d849f4
. 2008-04-17 11:09:11.750 Retrieving directory listing...
> 2008-04-17 11:09:11.750 CWD /XXX.XXXXXXX/XXX.XXXXXXX/
. 2008-04-17 11:09:11.765 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=1   caller=0x01d849f4
< 2008-04-17 11:09:11.765 550 XCWD valid $volume.subvolume format required.
. 2008-04-17 11:09:11.765 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=1   caller=0x01d849f4
. 2008-04-17 11:09:11.765 FtpControlSocket.cpp(4184): ResetOperation(4)  OpMode=4 OpState=2   caller=0x01d849f4
. 2008-04-17 11:09:11.765 Could not retrieve directory listing
. 2008-04-17 11:09:11.765 Got reply 4 to the command 2
. 2008-04-17 11:09:11.765 FtpControlSocket.cpp(1276): List(FALSE,0,"/XXX.XXXXXXX/XXX.XXXXXXX/","",1)  OpMode=0 OpState=-1   caller=0x01d849f4
. 2008-04-17 11:09:11.765 Retrieving directory listing...
> 2008-04-17 11:09:11.765 CWD /XXX.XXXXXXX/XXX.XXXXXXX/
. 2008-04-17 11:09:11.781 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=1   caller=0x01d849f4
< 2008-04-17 11:09:11.781 550 XCWD valid $volume.subvolume format required.
. 2008-04-17 11:09:11.781 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=1   caller=0x01d849f4
. 2008-04-17 11:09:11.781 FtpControlSocket.cpp(4184): ResetOperation(4)  OpMode=4 OpState=2   caller=0x01d849f4
. 2008-04-17 11:09:11.781 Could not retrieve directory listing
. 2008-04-17 11:09:11.781 Got reply 4 to the command 2
* 2008-04-17 11:09:11.781 (ECommand) Error listing directory '\XXX.XXXXXXX'.
* 2008-04-17 11:09:11.781 Could not retrieve directory listing
* 2008-04-17 11:09:11.781 XCWD valid $volume.subvolume format required.
. 2008-04-17 11:09:13.140 Startup conversation with host finished.
. 2008-04-17 11:09:13.875 Session upkeep
. 2008-04-17 11:09:19.875 Session upkeep
. 2008-04-17 11:09:20.078 Executing user defined command.
. 2008-04-17 11:09:20.078 Synchronizing current directory "\XXX.XXXXXXX".
. 2008-04-17 11:09:20.078 FtpControlSocket.cpp(1269): FtpCommand(CWD \XXX.XXXXXXX)  OpMode=0 OpState=-1   caller=0x01d849f4
> 2008-04-17 11:09:20.078 CWD \XXX.XXXXXXX
. 2008-04-17 11:09:20.093 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d849f4
< 2008-04-17 11:09:20.093 250 CWD command successful.
. 2008-04-17 11:09:20.093 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d849f4
. 2008-04-17 11:09:20.093 Got reply 1 to the command 16
. 2008-04-17 11:09:20.093 FtpControlSocket.cpp(1269): FtpCommand(oss)  OpMode=0 OpState=-1   caller=0x01d849f4
> 2008-04-17 11:09:20.093 oss
. 2008-04-17 11:09:20.140 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=2 OpState=-1   caller=0x01d849f4
< 2008-04-17 11:09:20.140 257 OSS API enabled.
. 2008-04-17 11:09:20.140 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=2 OpState=-1   caller=0x01d849f4
. 2008-04-17 11:09:20.140 Got reply 1 to the command 16
. 2008-04-17 11:09:20.140 Getting current directory name.
. 2008-04-17 11:09:20.375 Session upkeep
. 2008-04-17 11:09:20.875 Session upkeep
. 2008-04-17 11:09:21.375 Session upkeep
. 2008-04-17 11:09:21.593 FtpControlSocket.cpp(1276): List(FALSE,0,"/XXX.XXXXXXX/XXX.XXXXXXX/","",1)  OpMode=0 OpState=-1   caller=0x01d849f4
. 2008-04-17 11:09:21.593 Retrieving directory listing...
> 2008-04-17 11:09:21.593 CWD /XXX.XXXXXXX/XXX.XXXXXXX/
. 2008-04-17 11:09:21.609 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=1   caller=0x01d849f4
< 2008-04-17 11:09:21.609 550 /XXX.XXXXXXX/XXX.XXXXXXX/: chdir : No such file or directory
. 2008-04-17 11:09:21.609 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=1   caller=0x01d849f4
. 2008-04-17 11:09:21.609 FtpControlSocket.cpp(4184): ResetOperation(4)  OpMode=4 OpState=2   caller=0x01d849f4
. 2008-04-17 11:09:21.609 Could not retrieve directory listing
. 2008-04-17 11:09:21.609 Got reply 4 to the command 2
* 2008-04-17 11:09:21.625 (ECommand) Error listing directory '\XXX.XXXXXXX'.
* 2008-04-17 11:09:21.625 Could not retrieve directory listing
* 2008-04-17 11:09:21.625 /XXX.XXXXXXX/XXX.XXXXXXX/: chdir : No such file or directory
. 2008-04-17 11:09:21.875 Session upkeep
. 2008-04-17 11:09:24.890 Session upkeep
. 2008-04-17 11:09:25.234 Cached directory change via "/" to "/".
. 2008-04-17 11:09:25.234 Getting current directory name.
. 2008-04-17 11:09:25.234 FtpControlSocket.cpp(1276): List(FALSE,0,"/","",1)  OpMode=0 OpState=-1   caller=0x01d849f4
. 2008-04-17 11:09:25.234 Retrieving directory listing...
> 2008-04-17 11:09:25.234 CWD /
. 2008-04-17 11:09:25.250 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=1   caller=0x01d849f4
< 2008-04-17 11:09:25.250 250 CWD command successful.
. 2008-04-17 11:09:25.250 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=1   caller=0x01d849f4
> 2008-04-17 11:09:25.250 PWD
. 2008-04-17 11:09:25.265 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=2   caller=0x01d849f4
< 2008-04-17 11:09:25.265 257 "/" is current directory.
. 2008-04-17 11:09:25.265 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=2   caller=0x01d849f4
> 2008-04-17 11:09:25.265 TYPE A
. 2008-04-17 11:09:25.265 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=8   caller=0x01d849f4
< 2008-04-17 11:09:25.265 200 Type set to A.
. 2008-04-17 11:09:25.265 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=8   caller=0x01d849f4
> 2008-04-17 11:09:25.265 PORT 10,10,10,17,7,73
. 2008-04-17 11:09:25.265 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=7   caller=0x01d849f4
< 2008-04-17 11:09:25.265 200 PORT command successful.
. 2008-04-17 11:09:25.265 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=7   caller=0x01d849f4
. 2008-04-17 11:09:25.265 TransferSocket.cpp(597): SetActive()   caller=0x01d8e6ac
> 2008-04-17 11:09:25.265 LIST
. 2008-04-17 11:09:25.296 TransferSocket.cpp(418): OnAccept(0)   caller=0x01d8e6ac
. 2008-04-17 11:09:25.296 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=9   caller=0x01d849f4
< 2008-04-17 11:09:25.296 150 Opening data connection for /bin/ls (XXXXXXX,1865d) (0 bytes).
. 2008-04-17 11:09:25.296 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=9   caller=0x01d849f4
. 2008-04-17 11:09:25.421 TransferSocket.cpp(557): OnClose(0)   caller=0x01d8e6ac
. 2008-04-17 11:09:25.421 TransferSocket.cpp(1179): Close()   caller=0x01d8e6ac
. 2008-04-17 11:09:25.421 TransferSocket.cpp(1179): Close()   caller=0x01d8e6ac
. 2008-04-17 11:09:25.421 FtpControlSocket.cpp(2070): TransferEnd(4)  OpMode=4 OpState=10   caller=0x01d849f4
. 2008-04-17 11:09:25.421 FtpControlSocket.cpp(1276): List(TRUE,0,"","",0)  OpMode=4 OpState=10   caller=0x01d849f4
. 2008-04-17 11:09:25.421 total 44934
.....
. 2008-04-17 11:09:25.421 TransferSocket.cpp(108): ~CTransferSocket()   caller=0x01d8e6ac
. 2008-04-17 11:09:25.421 TransferSocket.cpp(1179): Close()   caller=0x01d8e6ac
. 2008-04-17 11:09:25.468 FtpControlSocket.cpp(878): OnReceive(0)  OpMode=4 OpState=10   caller=0x01d849f4
< 2008-04-17 11:09:25.468 226 Transfer Complete.
. 2008-04-17 11:09:25.468 FtpControlSocket.cpp(1276): List(FALSE,0,"","",0)  OpMode=4 OpState=10   caller=0x01d849f4
. 2008-04-17 11:09:25.468 Directory listing successful
. 2008-04-17 11:09:25.468 FtpControlSocket.cpp(4184): ResetOperation(1)  OpMode=4 OpState=10   caller=0x01d849f4
. 2008-04-17 11:09:25.468 Got reply 1 to the command 2
. 2008-04-17 11:09:25.531 Session upkeep

Reply with quote

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

Re: run command/script after login

Well, I do understand why it does not work in the first case, but does in the second. Maybe you have some documentation of the oss command? Maybe in needs to be execute in some sequence?

What if you try to specify some of the commands used in second case before oss, in post login commands, like:
PWD
CWD /XXX.XXXXXXX/XXX.XXXXXXX/
CWD \XXX.XXXXXXX
oss

Reply with quote

Advertisement

Guest

Re: run command/script after login

Hi,
when I run CoreFTP light (with post-login-command: oss) it works and the log says:
Welcome to Core FTP, release ver 1.3c, build 1447.6 (U) -- © 2003-2006
WinSock 2.0
Mem -- 2,088,432 KB, Virt -- 2,097,024 KB
Started on Friday April 18, 2008 at 09:39:AM
Resolving XXXXXXX...
Connect socket #968 to XXXXXX, port 21...
220 XXXX FTP SERVER T9552H02 (Version H02 TANDEM 15OCT2007) ready.
USER XXXX
331 Password required for XXXXX.
PASS **********
230 User XXXXXX logged in.  GUARDIAN API enabled
SYST
215 Nonstop H-series Server : H06.12.
oss
257 OSS API enabled.
Keep alive off...
CWD /usr/local/
250 CWD command successful.
PASV
227 Entering Passive Mode (XXXXXXX)
LIST
Connect socket #1188 to XXXXXX, port 3228...
150 Opening data connection for /bin/ls (XXXXXX,4623d) (0 bytes).
226 Transfer Complete.
Transferred 960 bytes in 0.062 seconds

Reply with quote

martin
Site Admin
martin avatar

Re: run command/script after login

when I run CoreFTP light (with post-login-command: oss) it works and the log says:
Do you see any difference? I do not.

Reply with quote

Guest

Re: run command/script after login

Sorry this wasn't meant offending, and you are right it's basically the same. But somehow there must be a difference. I will further try to find it out.
In the meantime I can work pretty well with the manually triggered command.
I really prefer WinSCP over CoreFTP ;-)

Thanks so far for your help

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: run command/script after login

But somehow there must be a difference. I will further try to find it out.
Thanks. Let me know.

Reply with quote

Madhu
Guest

How did you run command at login

I am talking about a ssh login and as soon as the login happens I want to run a command that will change the user for example I login with my domain network ID and once I login I want to run a command call dzdo, this a centrify command that will change my role on the machine.

Reply with quote

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

Re: How did you run command at login

Madhu wrote:

I am talking about a ssh login and as soon as the login happens I want to run a command that will change the user for example I login with my domain network ID and once I login I want to run a command call dzdo, this a centrify command that will change my role on the machine.
What protocol? See also https://winscp.net/eng/docs/faq_su

Reply with quote

Advertisement

You can post new topics in this forum