0

I'm using LFTP version 4.7.8 under cygwin. It automatically adds ";type=i" (or ";type=a" if I do put -a) to remote file name. What's more, mv command does not work : mv: Operation not supported: 501 Not Implemented (MOVE)

No issues at all using FileZilla on the same FTP server.

Any workarounds ?

  • the mvmessage seems coming from the server. – matzeri May 23 '18 at 15:14
2

For some reason you have decided to access your FTP server via an HTTP proxy, a protocol that the LFTP doco calls HFTP. You've encoded this decision either in the LFTP configuration file or in an ftp_proxy environment variable.

Your proxy is supposed to be decoding the ;type=i and ;type=a parts of the URLs that LFTP is sending to it, per RFC 1738 § 3.2.2. It isn't doing that, and is incorrectly passing them along to the target FTP server. There's a configuration file switch, documented in the LFTP user manual, to work around that, by omitting the FTP type suffix from the URLs sent to the proxy.

In HFTP mode, the mv command in the LFTP client becomes a MOVE command with a Destination: header to the HTTP proxy (which it in turn is expected to translate into FTP RNFR and RNTO verbs sent on to the target FTP server appropriately). Your HTTP proxy does not implement a MOVE HTTP verb at all.

It seems that your HTTP proxy is quite bad at FTP over HTTP.

Your choices are:

  • Get a better HTTP proxy that can handle HFTP.
  • Don't use an HTTP proxy for FTP in the first place.
  • Stop trying to rename files. ☺

Further reading

  • Christoph Lameter et al. (2017-08-10). lftp. General Commands Manual. lftp.yar.ru.
  • T. Berners-Lee, L. Masinter, and M. McCahill (1994-12). "FTP". Uniform Resource Locators RFC 1738.
  • Thank you for a very clear answer. The HTTP proxy is quiet old, and not great indeed. It is not under my control. The option set ftp:use-type no fixed the issue indeed (and, thus, no need for a mv anymore :). – ExpertNoob May 25 '18 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.