Search code examples
ftpcentoslftp

lftp mv command fails with "Operation not supported: 501 Not Implemented (MOVE)"


I'm trying to download all the files from a folder and then move them to another folder.

Here's my command:

lftp ftp://domain.com -u user,password-e "mirror -L --verbose --parallel=2 --use-pget-n=10 --newer-than=now-30minutes  /folder-source1/ /folder-target/; mv /folder-source1/* /forlder-source1/folder-source2; bye"

Download goes fine, but mv doesn't work, here's my error:

mv: Operation not supported: 501 Not Implemented (MOVE)

I'm using lftp v4.4.8 on CentOS, should I upgrade to 4.7 or is it another problem?


Solution

  • The error comes from the FTP server. It's the server that does not support the move.

    Upgrading lftp cannot help.

    The FTP server needs to support RNFR and RNTO FTP commands for the lftp mv command to work.