sftpgo icon indicating copy to clipboard operation
sftpgo copied to clipboard

[Bug]: FTPS fails with error 502 This command hasn't been implemented

Open koi8 opened this issue 7 months ago • 1 comments

⚠️ This issue respects the following points: ⚠️

  • [x] This is a bug, not a question or a configuration issue.
  • [x] This issue is not already reported on Github (I've searched it).

Bug description

3rd party connects to my ftps server. After switching from vsftpd to sftpgo connection fails with an error on STRU R command:

{"level":"debug","time":"2025-06-05T15:15:47.656","sender":"ftpserverlib","server_id":"FTP_0","clientId":"2","line":"230 Password ok, continue","message":"Sending answer"}
{"level":"debug","time":"2025-06-05T15:15:47.677","sender":"ftpserverlib","server_id":"FTP_0","clientId":"2","line":"SYST","message":"Received line"}
{"level":"debug","time":"2025-06-05T15:15:47.677","sender":"ftpserverlib","server_id":"FTP_0","clientId":"2","line":"215 UNIX Type: L8","message":"Sending answer"}
{"level":"debug","time":"2025-06-05T15:15:47.699","sender":"ftpserverlib","server_id":"FTP_0","clientId":"2","line":"STRU R","message":"Received line"}
{"level":"debug","time":"2025-06-05T15:15:47.699","sender":"ftpserverlib","server_id":"FTP_0","clientId":"2","line":"502 This command hasn't been implemented !","message":"Sending answer"}

Steps to reproduce

Expected behavior

Expected behaviour - use able to upload the file

SFTPGo version

2.6.6-6825db76

Data provider

FTPS

Installation method

Community Docker image

Configuration

{"ftpd":{"active_transfers_port_non_20":false,"banner_file":"","bindings":[{"active_connections_security":1,"address":"0.0.0.0","certificate_file":"/var/lib/sftpgo/ftps.pem","certificate_key_file":"/var/lib/sftpgo/ftps.pem","client_auth_type":0,"debug":true,"force_passive_ip":"REMOVED","ignore_ascii_transfer_type":0,"min_tls_version":12,"passive_connections_security":1,"passive_host":"","passive_ip_overrides":[],"port":2221,"tls_cipher_suites":["TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"],"tls_mode":1,"tls_session_reuse":0}],"certificate_file":"/var/lib/sftpgo/ftps.pem","certificate_key_file":"/var/lib/sftpgo/ftps.pem","combine_support":0,"disable_active_mode":false,"enable_site":false,"hash_support":0,"passive_port_range":{"end":21102,"start":21100}},"sftpd":{"bindings":[]},"users":[{"gid":0,"has_password":true,"home_dir":"/srv/sftpgo/data/ftpuser","id":1,"password":"REMOVED","permissions":{"/":["*"]},"public_keys":[],"status":1,"uid":0,"username":"ftpuser"}]}

Relevant log output


What are you using SFTPGo for?

Small business (3-person firm with file exchange?)

Additional info

No response

koi8 avatar Jun 05 '25 15:06 koi8

This edge case affecting older (broken) clients should be already fixed in our open-core version (used in SaaS deployments and by some enterprise plan subscribers). We'll evaluate whether to backport the relevant fix to the open-source version before the v2.7.0 release

drakkan avatar Jun 06 '25 16:06 drakkan