FTP
At a glance
Section titled “At a glance”| Capability | Support |
|---|---|
| rclone support tier | Tier 1: Core |
| Checksums | None |
| Modification times | Kept, to 1 s |
| Case-insensitive names | No |
| Duplicate names allowed | No |
| Server-side copy | No |
| Server-side move and rename | Yes |
| Folder move and rename | Yes, in one step |
| Free space reporting | No |
| Empty folders | Yes |
| Change notifications | No |
| Uploads of unknown size | Yes |
| Public links | No |
FTP is the File Transfer Protocol. Rclone FTP support is provided using the github.com/jlaffaye/ftp package.
Limitations of Rclone’s FTP backend
a / it is relative to the home directory of the user. An empty path
remote: refers to the user’s home directory.
Setup notes
Section titled “Setup notes”In CloudMount you add this drive from the Add drive screen, and the wizard asks for the options listed under Options. The notes below come from rclone’s setup guide.
Anonymous FTP
Section titled “Anonymous FTP”When connecting to a FTP server that allows anonymous login, you can use the special “anonymous” username. Traditionally, this user account accepts any string as a password, although it is common to use either the password “anonymous” or “guest”. Some servers require the use of a valid e-mail address as password.
Using on-the-fly or connection string remotes makes it easy to access such servers, without requiring any configuration in advance. The following are examples of that:
rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=$(rclone obscure dummy)rclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=$(rclone obscure dummy):The above examples work in Linux shells and in PowerShell, but not Windows Command Prompt. They execute the rclone obscure command to create a password string in the format required by the pass option. The following examples are exactly the same, except use an already obscured string representation of the same password “dummy”, and therefore works even in Windows Command Prompt:
rclone lsf :ftp: --ftp-host=speedtest.tele2.net --ftp-user=anonymous --ftp-pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxMrclone lsf :ftp,host=speedtest.tele2.net,user=anonymous,pass=IXs2wc8OJOz7SYLBk47Ji1rHTmxM:Implicit TLS
Section titled “Implicit TLS”Rlone FTP supports implicit FTP over TLS servers (FTPS). This has to
be enabled in the FTP backend config for the remote, or with
--ftp-tls. The default FTPS port is 990, not 21 and
can be set with --ftp-port.
TLS Options
Section titled “TLS Options”TLS options for Implicit and Explicit TLS can be set using the following flags which are specific to the FTP backend:
--ftp-no-check-certificate Do not verify the TLS certificate of the server--ftp-disable-tls13 Disable TLS 1.3 (workaround for FTP servers with buggy TLS)--ftp-tls-cache-size int Size of TLS session cache for all control and data connections (default 32)However any of the global TLS flags can also be used such as:
--ca-cert stringArray CA certificate used to verify servers--client-cert string Client SSL certificate (PEM) for mutual TLS auth--client-key string Client SSL private key (PEM) for mutual TLS auth--no-check-certificate Do not verify the server SSL certificate (insecure)If these need to be put in the config file so they apply to just the
FTP backend then use the override syntax, eg
override.ca_cert = XXXoverride.client_cert = XXXoverride.client_key = XXXRestricted filename characters
Section titled “Restricted filename characters”In addition to the default restricted characters set the following characters are also replaced:
File names cannot end with the following characters. Replacement is limited to the last character in a file name:
| Character | Value | Replacement |
|---|---|---|
| SP | 0x20 | ␠ |
Not all FTP servers can have all characters in file names, for example:
| FTP Server | Forbidden characters |
|---|---|
| proftpd | * |
| pureftpd | \ [ ] |
This backend’s interactive configuration wizard provides a selection of sensible encoding settings for major FTP servers: ProFTPd, PureFTPd, VsFTPd. Just hit a selection number when prompted.
Options
Section titled “Options”Standard options
Section titled “Standard options”The wizard asks for these when you add the drive.
FTP host to connect to.
E.g. “ftp.example.com”.
Type: string · Required
FTP username.
Type: string · Default: $USER
FTP port number.
Type: int · Default: 21
FTP password.
NB Input to this must be obscured - see rclone obscure.
Type: string
Use Implicit FTPS (FTP over TLS).
When using implicit FTP over TLS the client connects using TLS right from the start which breaks compatibility with non-TLS-aware servers. This is usually served over port 990 rather than port 21. Cannot be used in combination with explicit FTPS.
Type: bool · Default: false
explicit_tls
Section titled “explicit_tls”Use Explicit FTPS (FTP over TLS).
When using explicit FTP over TLS the client explicitly requests security from the server in order to upgrade a plain text connection to an encrypted one. Cannot be used in combination with implicit FTPS.
Type: bool · Default: false
Advanced options
Section titled “Advanced options”The wizard shows these under Advanced options. Most drives work without changing any of them.
concurrency
Section titled “concurrency”Maximum number of FTP simultaneous connections, 0 for unlimited.
Note that setting this is very likely to cause deadlocks so it should be used with care.
If you are doing a sync or copy then make sure concurrency is one more
than the sum of --transfers and --checkers.
If you use --check-first then it just needs to be one more than the
maximum of --checkers and --transfers.
So for concurrency 3 you’d use --checkers 2 --transfers 2 --check-first or --checkers 1 --transfers 1.
Type: int · Default: 0
no_check_certificate
Section titled “no_check_certificate”Do not verify the TLS certificate of the server.
Type: bool · Default: false
disable_epsv
Section titled “disable_epsv”Disable using EPSV even if server advertises support.
Type: bool · Default: false
disable_mlsd
Section titled “disable_mlsd”Disable using MLSD even if server advertises support.
Type: bool · Default: false
disable_utf8
Section titled “disable_utf8”Disable using UTF-8 even if server advertises support.
Type: bool · Default: false
writing_mdtm
Section titled “writing_mdtm”Use MDTM to set modification time (VsFtpd quirk)
Type: bool · Default: false
force_list_hidden
Section titled “force_list_hidden”Use LIST -a to force listing of hidden files and folders. This will disable the use of MLSD.
Type: bool · Default: false
idle_timeout
Section titled “idle_timeout”Max time before closing idle connections.
If no connections have been returned to the connection pool in the time given, rclone will empty the connection pool.
Set to 0 to keep connections indefinitely.
Type: Duration · Default: 1m0s
close_timeout
Section titled “close_timeout”Maximum time to wait for a response to close.
Type: Duration · Default: 1m0s
tls_cache_size
Section titled “tls_cache_size”Size of TLS session cache for all control and data connections.
TLS cache allows to resume TLS sessions and reuse PSK between connections. Increase if default size is not enough resulting in TLS resumption errors. Enabled by default. Use 0 to disable.
Type: int · Default: 32
disable_tls13
Section titled “disable_tls13”Disable TLS 1.3 (workaround for FTP servers with buggy TLS)
Type: bool · Default: false
allow_insecure_tls_ciphers
Section titled “allow_insecure_tls_ciphers”Allow insecure TLS ciphers
Setting this flag will allow the usage of the following TLS ciphers in addition to the secure defaults:
- TLS_RSA_WITH_AES_128_GCM_SHA256
Type: bool · Default: false
shut_timeout
Section titled “shut_timeout”Maximum time to wait for data connection closing status.
Type: Duration · Default: 1m0s
ask_password
Section titled “ask_password”Allow asking for FTP password when needed.
If this is set and no password is supplied then rclone will ask for a password
Type: bool · Default: false
socks_proxy
Section titled “socks_proxy”Socks 5 proxy host.
Supports the format user:pass@host:port, user@host:port, host:port.
Example:
myUser:myPass@localhost:9005Type: string
http_proxy
Section titled “http_proxy”URL for HTTP CONNECT proxy
Set this to a URL for an HTTP proxy which supports the HTTP CONNECT verb.
Supports the format http://user:pass@host:port, http://host:port, http://host.
Example:
http://myUser:myPass@proxyhostname.example.com:8000Type: string
no_check_upload
Section titled “no_check_upload”Don’t check the upload is OK
Normally rclone will try to check the upload exists after it has uploaded a file to make sure the size and modification time are as expected.
This flag stops rclone doing these checks. This enables uploading to folders which are write only.
You will likely need to use the –inplace flag also if uploading to a write only folder.
Type: bool · Default: false
encoding
Section titled “encoding”The encoding for the backend.
See the encoding section in the overview for more info.
Type: Encoding · Default: Slash,Del,Ctl,RightSpace,Dot
Choices:
Asterisk,Ctl,Dot,Slash: ProFTPd can’t handle ‘*’ in file namesBackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket: PureFTPd can’t handle ‘[]’ or ‘*’ in file namesCtl,LeftPeriod,Slash: VsFTPd can’t handle file names starting with dot
description
Section titled “description”Description of the remote.
Type: string
Limitations
Section titled “Limitations”FTP servers acting as rclone remotes must support passive mode.
The mode cannot be configured as passive is the only supported one.
Rclone’s FTP implementation is not compatible with active mode
as the library it uses doesn’t support it.
This will likely never be supported due to security concerns.
Rclone’s FTP backend does not support any checksums but can compare file sizes.
rclone about is not supported by the FTP backend. Backends without
this capability cannot determine free space for an rclone mount or
use policy mfs (most free space) as a member of an rclone union
remote.
See List of backends that do not support rclone about and rclone about.
The implementation of : --dump headers,
--dump bodies, --dump auth for debugging isn’t the same as
for rclone HTTP based backends - it has less fine grained control.
--timeout isn’t supported (but --contimeout is).
--bind isn’t supported.
Rclone’s FTP backend could support server-side move but does not at present.
The ftp_proxy environment variable is not currently supported.
Modification times
Section titled “Modification times”File modification time (timestamps) is supported to 1 second resolution
for major FTP servers: ProFTPd, PureFTPd, VsFTPd, and FileZilla FTP server.
The VsFTPd server has non-standard implementation of time related protocol
commands and needs a special configuration setting: writing_mdtm = true.
Support for precise file time with other FTP servers varies depending on what
protocol extensions they advertise. If all the MLSD, MDTM and MFTM
extensions are present, rclone will use them together to provide precise time.
Otherwise the times you see on the FTP server through rclone are those of the
last file upload.
You can use the following command to check whether rclone can use precise time
with your FTP server: rclone backend features your_ftp_remote: (the trailing
colon is important). Look for the number in the line tagged by Precision
designating the remote time precision expressed as nanoseconds. A value of
1000000000 means that file time precision of 1 second is available.
A value of 3153600000000000000 (or another large number) means “unsupported”.