passing -x '' to ncftpls by duplicity causes it to fail

Bug #245740 reported by Kent Tong
4
Affects Status Importance Assigned to Milestone
Duplicity
Unknown
Unknown
duplicity (Ubuntu)
Fix Released
Medium
Kenneth Loafman

Bug Description

Binary package hint: duplicity

Duplicity runs ncftpls like this:

 ncftpls -x '' -f t1 -F -t 30 ftp://ftp.agileskills2.org/

in which -x '' causes it to fail (exit code = 3, ie, transfer error), at least on my
Yahoo ftp server. To fix it, I modified the file
/usr/lib/python2.5/site-packages/duplicity/backends.py and changed the
line from:

   commandline = "ncftpls -x '' %s '%s'" % \
                                          (self.flags, self.url_string)

To:

   commandline = "ncftpls -x '-t' %s '%s'" % \
                                          (self.flags, self.url_string)

Related branches

Revision history for this message
Daniel Hahler (blueyed) wrote :

Are you using duplicity 0.4.10-1 on Hardy?
Please try, if omitting the -x flag altogether works perhaps:
ncftpls -f t1 -F -t 30 ...

If this also fails (I expect that), please try other flags for "ls", e.g. "-f" for "do not sort".
Seems to be a strange error (caused by ncftpls with your ftp server). Can you find out which FTP server Yahoo uses here (name + version)?

Changed in duplicity:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Kent Tong (kent-tong) wrote :

Yes, using 0.4.10-1 on Hardy.

Omitting -x entirely works.

I don't know what FTP server Yahoo uses. The output of the SYST FTP command is:

   UNIX Type: L8 Version: BSD-199506

However, isn't that an issue with ncftpls? If it finds -x has an empty argument, it should
really not pass any extra ls argument to the remote site. In addition, in the FTP RFC
(http://tools.ietf.org/html/rfc959), I don't find a way to pass ls arguments to the FTP
server at all! So this is really an implementation specific behavior that can't be replied
on.

Daniel Hahler (blueyed)
Changed in duplicity:
status: Incomplete → Triaged
Changed in duplicity:
assignee: nobody → kenneth-loafman
Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

This bug has been fixed in the recent 0.5.09 version at http://duplicity.nongnu.org. I finally moved to running ncftp directly through pexpect rather than going through their utilities (ncftpls, ..get, ..put). This gets rid of the issues of the complicated and obscure command lines and all the inconsistencies that occur between ncftp's versions of those.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package duplicity - 0.5.09-0ubuntu1

---------------
duplicity (0.5.09-0ubuntu1) jaunty; urgency=low

  * New upstream release
  * Fixes "passing -x '' to ncftpls by duplicity causes it to fail"
    LP: #245740

 -- Daniel Hahler <email address hidden> Wed, 18 Feb 2009 19:54:13 +0100

Changed in duplicity:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.