Hi, In message <_A3491@delegate-en.ML_> on 09/14/06(19:18:47) you "Gsandtner Michael" <psagqbdyi-mxhgu4zbz33w.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 <pfqcabdyi-mxhgu4zbz33w.ml@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);