JFTP Return Codes
The JFTP tool tries to reflect as its return code to the OS the last reply code, divided by ten (10). The reason for this is that on some operating systems the return code is limited to a value between 0 and 255, so it cannot reflect all FTP return codes.
Return codes, also referred to as reply codes, give feedback on the status of the previously executed command. RFC's define the standards for protocols to allow tools to inter-operate, however, vendors are not forced to adhere to the RFC's standards and many don't adhere totally. The jftp tool will return standard FTP return codes when the FTP server does, so the Internet is a great resource to look-up the meaning of a specific error.
FTP reply codes are defined in RFC 354 and RFC 414 and according to those RFC's, reply codes are made of the following:.
The first digit specifies the type of error:
- 4xx Unsuccessful reply. The request is correctly specified but the server is unsuccessful in correctly fulfilling it.
- 5xx Incorrect or illegal command. The command or its parameters were invalid or incomplete from a syntactic viewpoint, or the command its inconsistent with a previous command. The command in question has been completely ignored.
The second digit specifies the general category to which the response refers:
- x40 Secondary access. The primary server is commenting on its ability to access a secondary service.
- x5x FTP results.
The final digit specifies a particular message type. Since the code is designed for an automaton process to interpret, it is not necessary for every variation of a reply to have a unique number. This is why jftp does not return this digit.
The officially assigned reply codes above 400 and relating to FTP are:
- 400 This service not implemented.
- 401 This service not accepting users now, goodbye.
- 430 Log-on time or tries exceeded, goodbye.
- 431 Log-on unsuccessful. User and/or password invalid.
- 432 User not valid for this service.
- 433 Cannot store files without valid account. Enter account.
- 434 Log-out forced by operator action. Phone site.
- 435 Log-out forced by system problem.
- 436 Service shutting down, goodbye.
- 450 FTP: File not found.
- 451 FTP: File access denied to you.
- 452 FTP: File transfer incomplete, data connection closed.
- 453 FTP: File transfer incomplete, insufficient storage space.
- 500 Last command line completely unrecognized.
- 501 Syntax of last command in incorrect.
- 502 Last command incomplete, parameters missing.
- 503 Last command invalid (ignored), illegal parameter combination.
- 504 Last command invalid, action not possible at this time.
- 505 Last command conflicts illegally with previous command(s).
- 506 Requested action not implemented by the server.
note
jftp
will only return the first two digits of any reply code.
On UNIX and Microsoft Windows, jftp returns:
- 0 on success.
- 1 on usage errors and so on
- the first two digits of the last FTP command result code when this is above 400.