Re: lftp-3.0.4 always tries to issue CPSV command when doing secure FXP with SSCN-enabled server
"Alexander V. Lukyanov" <[email protected]>
| Newsgroups | gmane.network.lftp.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Jun 06, 2004 at 07:50:15AM -0700, Roboco Sanchez wrote:
> "... the RFC [2389] explicitly states what the server
> reply should be when '...a server-FTP process does not
> support the FEAT command, it will respond to the FEAT
> command with a 500 or 502 reply.' At the point in
> question, before login, RaidenFTPd does not support
> FEAT - therefore the response is correct. The only
> other code defined is 501 - 'Errors in the command
> syntax, such as giving parameters, will result in a
> 501 reply.'
>
> The Raiden Team does a good job conforming to RFC's -
> this is just another example..."
I do not think so. In my understanding, the code 500 means
that the server does not support the command at all, i.e.
it does not understand it.
> To me, that means:
> 1) it's not against the RFC for a server to only
> support FEAT after login and to not support it before
> login. Is that correct?
The server may refuse to execute a command before login,
but it should not mean the command is not supported.
> 2) any server deploys such strategy in 1) that replies
> to FEAT with anything other than 500, 501 or 502, this
> includes: wuftpd (530), BlackMoon (503), Microsoft FTP
> Server (530), doesn't conform to the RFC. Is that
> correct?
500 Syntax error, command unrecognized.
This may include errors such as command line too long.
Using FEAT before login is not a syntax error, if the server recognizes such
command.
501 Syntax error in parameters or arguments.
This error should only be returned iff the command is recognized, but the
command arguments have a syntax error, e.g. incorrect options. This error
code is used for SITE command with unknown sub-command.
502 Command not implemented.
The server recognizes the command, but its functionality is not implemented.
503 Bad sequence of commands.
This means that commands were given in wrong order. E.g. RNTO without RNFR.
RFC959 only specifies that this error code can be used for PASS, ACCT and RNTO.
I think it should only be used for commands which are part of multicommand
sequences, e.g. USER-PASS-ACCT or RNFR-RNTO, when first commands return 3xx
codes. It is not quite appropriate for FEAT, as it is not part of multicommand
sequence.
504 Command not implemented for that parameter.
This is similar to 501, arguments syntax is recognized, but functionality
is not implemented, e.g. correct but unsupported options. This error
code is used for SITE command with known but unimplemented sub-command.
530 Not logged in.
RFC959 specifies the code 530 can be returned by any ftp command which
is not allowed before login. It means that the command was not executed
because the user has not logged in.
550 Requested action not taken.
File unavailable (e.g., file not found, no access).
This means that the command was not executed because of file access error.
In my opinion, 530 is the most appropriate error code for any command which
requires login.
--
Alexander.