|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hermesftp.cmd.AbstractFtpCmd net.sf.hermesftp.cmd.impl.FtpCmdOpts
public class FtpCmdOpts
OPTS Command
The OPTS (options) command allows a user-PI to specify the desired behavior of a server-FTP process when another FTP command (the target command) is later issued. The exact behavior, and syntax, will vary with the target command indicated, and will be specified with the definition of that command. Where no OPTS behavior is defined for a particular command there are no options available for that command.
Request Syntax:
opts = opts-cmd SP command-name [ SP command-options ] CRLF opts-cmd = "opts" command-name = <any FTP command which allows option setting> command-options = <format specified by individual FTP command>Response Syntax:
opts-response = opts-good / opts-bad opts-good = "200" SP response-message CRLF opts-bad = "451" SP response-message CRLF / "501" SP response-message CRLF response-message = *TCHARAn "opts-good" response (200 reply) MUST be sent when the command- name specified in the OPTS command is recognized, and the command- options, if any, are recognized, and appropriate. An "opts-bad" response is sent in other cases. A 501 reply is appropriate for any permanent error. That is, for any case where simply repeating the command at some later time, without other changes of state, will also be an error. A 451 reply should be sent where some temporary condition at the server, not related to the state of communications between user and server, prevents the command being accepted when issued, but where if repeated at some later time, a changed environment for the server-FTP process may permit the command to succeed. If the OPTS command itself is not recognized, a 500 or 502 reply will, of course, result.
The OPTS command MUST be implemented whenever the FEAT command is implemented. Because of that, there is no indication in the list of features returned by FEAT to indicate that the OPTS command itself is supported. Neither the FEAT command, nor the OPTS command, have any optional functionality, thus there are no "OPTS FEAT" or "OPTS OPTS" commands.
Security Considerations: No significant new security issues, not already present in the FTP protocol, are believed to have been created by this extension. However, this extension does provide a mechanism by which users can determine the capabilities of an FTP server, and from which additional information may be able to be deduced. While the same basic information could be obtained by probing the server for the various commands, if the FEAT command were not provided, that method may reveal an attacker by logging the attempts to access various extension commands. This possibility is not considered a serious enough threat to be worthy of any remedial action. The security of any additional features that might be reported by the FEAT command, and manipulated by the OPTS command, should be addressed where those features are defined.
[Excerpt from RFC-2389, Hethmon and Elz]
Field Summary |
---|
Constructor Summary | |
---|---|
FtpCmdOpts()
|
Method Summary | |
---|---|
void |
execute()
Executes the command. |
java.lang.String |
getHelp()
Returns a short help text for the command. |
boolean |
isAuthenticationRequired()
Returns whether authentication is needed or not. |
Methods inherited from class net.sf.hermesftp.cmd.AbstractFtpCmd |
---|
getAbsPath, getAndResetFileOffset, getArguments, getCtx, getPathArg, getPermission, getToken, handleAsyncCmd, isResponded, msg, msg, msg, msgOut, msgOut, msgOut, out, setArguments, setCtx, setToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FtpCmdOpts()
Method Detail |
---|
public void execute() throws FtpCmdException
FtpCmdException
- Thrown on any exception occuring while the command is executed.public java.lang.String getHelp()
public boolean isAuthenticationRequired()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |