lavv17/lftp — Issue #16: Incorrect filename passed to SIZE and MDTM
Author: cctg893
Created: 2012-01-30 18:03:11+00:00
State: open

Build from source on debian 6 ( 2.6.32-5-686) using lftp-4.3.5.tar.gz. I also see this in the lftp that comes bundled with debian. I have turned on debug 9 and see messages like these:

---> MDTM 12 22:56 test.txt
<--- 550 File /Private/backup/VM-BACKUPS/12 22:56 test.txt unavailable.
---> SIZE 12 22:56 test.txt
<--- 550 /Private/backup/VM-BACKUPS/12 22:56 test.txt: No such file or directory.

It seems to be using SIZE command with extra parameters? I believe it should be "SIZE test.txt" instead of "SIZE 12 22:56 test.txt". I traced it to ftpclass.cc around like 2684. I am using a -f command with reverse mirroring and -ignore-time. Without ignore time, it also makes calls to MDTM and SIZE with additional parameters. I am not sure if this is a OS or FTP specific problem.

Login messages:
---- Resolving host address...
---- 1 address found: xx.xxx.xxx.xxxx
---- Connecting to xxxxxxxx (xx.xxx.xxx.xxxx) port 21
<--- 220 Service ready for new user.
---> FEAT
<--- 530 Access denied.
---> USER xxxxxxxx
<--- 331 User name okay, need password for xxxxxxxx.
---> PASS xxxxxxxx
<--- 230 User logged in, proceed.
---> FEAT
<--- 211-Extensions supported
<--- SIZE
<--- MDTM
<--- LANG en;zh-tw;ja;is
<--- MLST Size;Modify;Type;Perm
<--- AUTH SSL
<--- AUTH TLS
<--- MODE Z
<--- UTF8
<--- TVFS
<--- MD5
<--- MMD5
<--- MFMT
<--- 211 End
---> PWD
<--- 257 "/" is current directory.
---> LANG
<--- 200 Command LANG okay.
---> OPTS UTF8 ON
<--- 200 Command OPTS okay.
---> OPTS MLST Size;Modify;Type;Perm;
---- CWD path to be sent is `/Private/backup'
<--- 200 Command OPTS okay.
---> CWD /Private/backup
<--- 250 Directory changed to /Private/backup
---> TYPE I
<--- 200 Command TYPE okay.
---> PASV
<--- 227 Entering Passive Mode (XXX,83,111,232,223,224)
---- Connecting data socket to (xx.xxx.xxx.xxxx) port 64174
---- Data connection established
---> ALLO 1701
<--- 502 Command ALLO not implemented.
---> STOR tardir.sh
<--- 150 File status okay; about to open data connection.
---- Closing data socket
<--- 226 Transfer complete.
---> MFMT 20120128223848 tardir.sh
<--- 213 ModifyTime=20120128223848; tardir.sh
---> PASV
<--- 227 Entering Passive Mode (XXX,83,111,232,223,224)
---- Connecting data socket to (xx.xxx.xxx.xxxx) port 57312
---- Data connection established
---> STOR egnyte-login.cmd
<--- 150 File status okay; about to open data connection.
---- Closing data socket
<--- 226 Transfer complete.
---> MFMT 20120130173455 elogin.cmd
<--- 213 ModifyTime=20120130173455; elogin.cmd
---> MKD /Private
<--- 451 You may not create folder or upload files directly to / (root), /Shared or /Private folders. Please choose an appropriate subfolder.
---> MKD /Private/backup
<--- 451 You may not create folder or upload files directly to / (root), /Shared or /Private folders. Please choose an appropriate subfolder.
---> MKD /Private/backup/VM-BACKUPS
<--- 550 /Private/backup/VM-BACKUPS: already exists.
---- CWD path to be sent is `/Private/backup/VM-BACKUPS'
---> CWD /Private/backup/VM-BACKUPS
<--- 250 Directory changed to /Private/backup/VM-BACKUPS
---> TYPE A
<--- 200 Command TYPE okay.
---> PASV
<--- 227 Entering Passive Mode (XXX,83,111,232,198,141)
---- Connecting data socket to (xx.xxx.xxx.xxxx) port 50829
---- Data connection established
---> LIST
<--- 150 File status okay; about to open data connection.
---- Got EOF on data connection
---- Closing data socket
<--- 226 Closing data connection.
---> TYPE I
<--- 200 Command TYPE okay.