Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

ftp: provide valid encoding for ProFtpd, PureFtpd, VsFtpd

Ivan Andreevdc589d3070bc
diff --git a/backend/ftp/ftp.go b/backend/ftp/ftp.go
index b5cfe2f24..91c8fad99 100644
--- a/backend/ftp/ftp.go
+++ b/backend/ftp/ftp.go
@@ -120,13 +120,20 @@ Set to 0 to keep connections indefinitely.
Name: config.ConfigEncoding,
Help: config.ConfigEncodingHelp,
Advanced: true,
- // The FTP protocol can't handle trailing spaces (for instance
- // pureftpd turns them into _)
- //
- // proftpd can't handle '*' in file names
- // pureftpd can't handle '[', ']' or '*'
+ // The FTP protocol can't handle trailing spaces
+ // (for instance, pureftpd turns them into '_')
Default: (encoder.Display |
encoder.EncodeRightSpace),
+ Examples: []fs.OptionExample{{
+ Value: "Asterisk,Ctl,Dot,Slash",
+ Help: "ProFTPd can't handle '*' in file names",
+ }, {
+ Value: "BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket",
+ Help: "PureFTPd can't handle '[]' or '*' in file names",
+ }, {
+ Value: "Ctl,LeftPeriod,Slash",
+ Help: "VsFTPd can't handle file names starting with dot",
+ }},
}},
})
}
diff --git a/docs/content/ftp.md b/docs/content/ftp.md
index e883866ef..60e9f1d7b 100644
--- a/docs/content/ftp.md
+++ b/docs/content/ftp.md
@@ -256,6 +256,13 @@ See: the [encoding section in the overview](/overview/#encoding) for more info.
- Env Var: RCLONE_FTP_ENCODING
- Type: MultiEncoder
- Default: Slash,Del,Ctl,RightSpace,Dot
+- Examples:
+ - "Asterisk,Ctl,Dot,Slash"
+ - ProFTPd can't handle '*' in file names
+ - "BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket"
+ - PureFTPd can't handle '[]' or '*' in file names
+ - "Ctl,LeftPeriod,Slash"
+ - VsFTPd can't handle file names starting with dot
{{< rem autogenerated options stop >}}