FTP reply code 504 means the server recognizes the command but does not support the specific parameter used. This is narrower than 502 (entire command not implemented) — the command works for some parameters but not the one specified. Common examples include requesting an unsupported AUTH mechanism (e.g., AUTH GSSAPI when only AUTH TLS is supported), using an unsupported TYPE value, or specifying a MODE or STRU parameter the server has not implemented. The client should retry with a supported parameter.
The client sent AUTH with a security mechanism the server does not support. For example, AUTH GSSAPI or AUTH KERBEROS when the server only supports AUTH TLS and AUTH SSL.
The client requested a transfer type the server does not support. While TYPE A (ASCII) and TYPE I (Image/Binary) are universally supported, TYPE E (EBCDIC) and TYPE L (Local) may return 504 on many servers.
The client sent MODE B (Block) or MODE C (Compressed) instead of MODE S (Stream), or STRU R (Record) or STRU P (Page) instead of STRU F (File). Most modern servers only support Stream mode and File structure.
Send FEAT to see which extensions and parameter values the server supports. For AUTH, look for 'AUTH TLS' or 'AUTH SSL'. For other commands, the server may not list specific parameters.
curl -v ftp://ftp.example.com/ -Q 'FEAT'
Stick to the most common parameter values: TYPE I or TYPE A, MODE S, STRU F, AUTH TLS. These are supported by virtually all modern FTP servers.
Code 504 is permanent for the specific parameter. Try a different parameter value, or use an alternative command if available.
The FTP server recognized the command but has not implemented it or has disabled it.
The server did not recognize the FTP command. It may be misspelled, malformed, or unsupported.
The FTP command was recognized but the parameters or arguments are invalid.