Article delegate-en/3494 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]

Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: ftp/sftp gateway not working
15 Sep 2006 08:33:30 GMT "Gsandtner Michael" <psagqbdyi-uqy4d4vpvhjr.ml@ml.delegate.org>


The supplied patch works.
Thanks for the quick support.

Best Regards --Michi

> -----Ursprüngliche Nachricht-----
> Von: Yutaka Sato *EXTERN* [mailto:feedback@delegate.org] 
> Gesendet: Donnerstag, 14. September 2006 14:13
> An: feedback@delegate.org
> Cc: Gsandtner Michael
> Betreff: Re: [DeleGate-En:3498] ftp/sftp gateway not working
> 
> Hi,
> 
> In message 
> <0C2EA6E466945D45B9A9521DEE7DF41D09EFA3A5@EXADV1.host.magwien.
> gv.at> on 09/14/06(19:18:47)
> you "Gsandtner Michael" <psagqbdyi-uqy4d4vpvhjr.ml@ml.delegate.org> wrote:
>  |I tried delegate9.2.5-pre2. The connection problem is 
> solved. Thanks.
>  |
>  |But now the "cd" command seems not to work.
>  |After connecting "ls" gives the correct listing of users home.
>  |After "cd test" (the test directory exists on the server) I 
> am in the
>  |root directory of the server.
> 
> I could reproduce the problem on Linux.
> 
>  |09/14 12:00:08.93 [10404] 1+0/4: --SFTP << pwd^M
>  |09/14 12:00:08.93 [10404] 1+0/4: --SFTP >>(PASS) 
> pwd^M^JRemote working
>  |directory: /sftp/wln9adv
>  |09/14 12:00:08.95 [10404] 1+0/4: --SFTP >>(PASS/NO-NL)[sftp> ]
>  |09/14 12:00:08.97 [10404] 1+0/4: --SFTPGW << [PWD][]
>  |09/14 12:00:08.97 [10404] 1+0/4: --SFTP << pwd^M
>  |09/14 12:00:08.97 [10404] 1+0/4: --SFTP >>(PWD) 
> pwd^M^JRemote working
>  |directory: /sftp/wln9adv
>  |09/14 12:00:08.99 [10404] 1+0/4: --SFTP >>(PWD/NO-NL)[sftp> ]
>  |09/14 12:00:09.01 [10384] 1+0/4: FTP-SERVER-SAYS: 257 "/"^M
> 
> On MacOSX (or on BSD Unixes), it is shown as follows:
> 
>  --SFTPGW << [PWD][]
>  --SFTP << pwd^M
>  --SFTP >>(PWD) Remote working directory: /Users/delegate
>  --SFTP >>(PWD/NO-NL)[sftp> ]
>  --SFTPGW >> 257 "/Users/delegate"
> 
> DeleGate for sftp/SSH gateway uses the sftp command via a Pty 
> which has
> its origin in BSD.  BSD Pty seems initiated with "-echo" by 
> default while
> non-BSD Pty seems initiated with "echo ctlecho".
> So adding "stty -echo" before "sftp" command solves the 
> problem, as the
> enclosed patch.
> 
> Cheers,
> Yutaka
> --
>   9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
>  ( ~ )  National Institute of Advanced Industrial Science and 
> Technology
> _<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
> Do the more with the less -- B. Fuller
> 
> 
> *** ../arc/delegate9.2.5-pre2/src/sftp.c	Fri Sep  8 02:13:33 2006
> --- src/sftp.c	Thu Sep 14 21:05:01 2006
> ***************
> *** 143,149 ****
> --- 143,152 ----
>   	int from[2];
>   	int rcode;
>   
> + 	/*
>   	sprintf(com,"%s -oPort=%d %s@%s",sftp_com,port,user,host);
> + 	*/
> + 	sprintf(com,"stty -echo; %s -oPort=%d 
> %s@%s",sftp_com,port,user,host);
>   	DEBUG("--SFTP: %s\n",com);
>   
>   	pid = Forkpty(&pty,name);
> 

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V