I need to programmatically copy data from an FTP server with rclone
.
The config is as simple as:
[exampleftp]
type = ftp
host = ftp.example.com
user = myuser
pass = mypass
If I try to copy anything, I get:
Failed to create file system for "exampleftp:/": NewFs: failed to make FTP connection to "ftp.example.com:21": UTF8 support on
Dumping the protocol exchange shows:
$ rclone --config=rclone.conf ls exampleftp: -vv --dump bodies
DEBUG : Using config file from "rclone.conf"
DEBUG : rclone: Version "v1.55.1-DEV" starting with parameters ["rclone" "--config=rclone.conf" "ls" "exampleftp:" "-vv" "--dump" "bodies"]
DEBUG : Creating backend with remote "exampleftp:"
DEBUG : ftp://ftp.example.com:21: Connecting to FTP server
DEBUG : FTP Rx: "220 Welcome to the example FTP Server."
DEBUG : FTP Tx: "USER myuser"
DEBUG : FTP Rx: "331 User myuser, password please"
DEBUG : FTP Tx: PASS *****
DEBUG : FTP Rx: "230 Password Ok, User logged in"
DEBUG : FTP Tx: "FEAT"
DEBUG : FTP Rx: "211- Additional features supported include:"
DEBUG : FTP Rx: " MDTM"
DEBUG : FTP Rx: " MFCT"
DEBUG : FTP Rx: " MFMT"
DEBUG : FTP Rx: " SIZE"
DEBUG : FTP Rx: " REST STREAM"
DEBUG : FTP Rx: " AUTH TLS"
DEBUG : FTP Rx: " AUTH SSL"
DEBUG : FTP Rx: " PBSZ"
DEBUG : FTP Rx: " EPRT"
DEBUG : FTP Rx: " EPSV"
DEBUG : FTP Rx: " XCRC"
DEBUG : FTP Rx: " XSHA1"
DEBUG : FTP Rx: " XSHA256"
DEBUG : FTP Rx: " XSHA512"
DEBUG : FTP Rx: " XMD5"
DEBUG : FTP Rx: " HASH SHA-256;SHA-512;SHA-1*;MD5"
DEBUG : FTP Rx: " PROT"
DEBUG : FTP Rx: " LANG EN*"
DEBUG : FTP Rx: " SITE PSWD"
DEBUG : FTP Rx: " SITE ZONE"
DEBUG : FTP Rx: " SITE UTIME"
DEBUG : FTP Rx: " MODE Z ZLIB(LEVEL)"
DEBUG : FTP Rx: " MLST Type*;Size*;Modify*;Create*;"
DEBUG : FTP Rx: " CLNT"
DEBUG : FTP Rx: " CSID"
DEBUG : FTP Rx: " RMDA"
DEBUG : FTP Rx: " UTF8"
DEBUG : FTP Rx: "211 End"
DEBUG : FTP Tx: "TYPE I"
DEBUG : FTP Rx: "200 Type Binary"
DEBUG : FTP Tx: "OPTS UTF8 ON"
DEBUG : FTP Rx: "220 UTF8 support on"
DEBUG : FTP Tx: "QUIT"
Failed to create file system for "exampleftp:": NewFs: failed to make FTP connection to "ftp.example.com:21": UTF8 support on
To me, this seems to say:
- Server: "I support UTF8"
- Client: "Great, then please use UTF8"
- Server: "Sure, here it is"
- Client: "Err, I need to go. Bye."
Everything works ok with another client, such as lftp
.
However would much prefer to use rclone
, as this would be part of a framework that is pre-configured for rclone
.
Does anybody know what is going on and any workaround?