The pwd problem is getting a bit worse.  ie:

./lftp 0
lftp 0:~> d 9
lftp 0:~> cd .
---- Connecting to 0 (0.0.0.0) port 21
<--- 220-
<--- 220 Server ready.
---> USER anonymous
<--- 331 Anonymous login ok, send your complete email address as your password.
---> PASS lftp@
<--- 230 Anonymous access granted, restrictions apply.
---> PWD
<--- 257 "/" is current directory.
cd ok, cwd=/

lftp glenn@0:~> ls
---- Connecting to 0 (0.0.0.0) port 21
<--- 220-
<--- 220 Server ready.
---> AUTH TLS
<--- 431 Local error code 2 was returned from tls_init()
---> USER glenn
<--- 331 Password required for glenn.
---> PASS XXXX
<--- 230 User glenn logged in.
---> PWD
<--- 257 "/home/glenn" is current directory.
---> PORT 127,0,0,1,14,173
<--- 200 PORT command successful.
---> LIST
<--- 150 Opening ASCII mode data connection for file list.
<--- 226-Transfer complete.
<--- 226 Quotas off
---- Closing data socket
...
drwxr-xr-x   4 glenn    users        8192 Aug 31 06:07 zz
lftp glenn@0:~> cd zz
---> CWD /zz
<--- 550 /zz: No such file or directory
cd: Access failed: 550 /zz: No such file or directory

If I skip anything (ie. do an "ls" instead of "cd ." on the first
login), the CWD succeeds.

This is a little strange, too:

05:25pm [EMAIL PROTECTED]/7 [~/lftp-orig/src] ./lftp glenn@0
Password:
lftp glenn@0:~> d 9
lftp glenn@0:~> ls
---- Connecting to 0 (0.0.0.0) port 21
<--- 220-
<--- 220 Server ready.
---> AUTH TLS
<--- 431 Local error code 2 was returned from tls_init()
---> USER glenn
<--- 331 Password required for glenn.
---> PASS XXXX
<--- 230 User glenn logged in.
---> PWD
<--- 257 "/home/glenn" is current directory.
---> PORT 127,0,0,1,5,123
<--- 200 PORT command successful.
---> LIST
<--- 150 Opening ASCII mode data connection for file list.
(my /home/glenn listing)
lftp glenn@0:~> pwd
ftp://glenn@0
lftp glenn@0:~> cd ..
---> CWD /home/glenn/..
<--- 250 CWD command successful.
cd ok, cwd=/home/glenn/..
lftp glenn@0:~/..> pwd
ftp://glenn@0/%2Fhome/glenn/..
lftp glenn@0:~/..>

I'm guessing the PWD should be "%2Fhome".  (I assume that extra leading
slash indicates it's a "cd /home" rather than a "cd home". Does that leading
slash need to be escaped?)

Related stuff that can wait until this is fixed:

It'd be extremely useful to be able to queue stuff on one user, and
have the queue execute on another; lots of busy FTPs provide "look"
users for just this purpose.  The CWD is a pain here, though: the queue
feeder doesn't know the user changed, causing the CWD to be reset under
its nose; therefore it doesn't send a cd.  A possible solution might be
to send a "soft" cd--that is, a CD that the session can discard if it
thinks it's already in that directory.  Then, the queue feeder can
simply *always* send a "cd -s /dir" for every command, without slowing
things down.  It should maintain the current jobs -v behavior, though
(it's useful) ...

It does *almost* work: if I'm careful and match directories, I can queue
a "user" command and it'll work.

-- 
Glenn Maynard

Reply via email to