From 6563ce9dffdaf71ce78120bbdfbe8b024d41d933 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 18 Jul 2020 14:21:12 +0100 Subject: [PATCH] Workaround pure-ftpd connections failing with "Unknown command" pure-ftpd 1.0.49-4 as supplied as part of Ubuntu 20.04 advertises UTF8 support in the FEAT command but the OPTS command fails to turn it on. OPTS UTF8 ON 504 Unknown command This patch introduces a workaround to ignore the error which enables this library to work with this version of pure-ftpd. Filezilla appears to ignore this error in a similar way. --- ftp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftp.go b/ftp.go index faf1c9c..f8b9153 100644 --- a/ftp.go +++ b/ftp.go @@ -346,7 +346,7 @@ func (c *ServerConn) setUTF8() error { } // Workaround for FTP servers, that does not support this option. - if code == StatusBadArguments { + if code == StatusBadArguments || code == StatusNotImplementedParameter { return nil }