Some of you may remember my tutorial Building your own IDS tripwire. I wanted to extend the use-ability of this sort of app (regardless of O/S) a bit by adding a descriptive service status, rather than the numerical message actually stored in the logs.

The service codes given below include the descriptions of the numerical values that are added to the ServiceStatus field of your webserver log files.

What are service codes?

When a web server (serving any content inluding Http, FTP and others) receives a request it send back an error code. Some of these codes are just informational and some represent errors either on the server or by the client.

You see service codes every day on the internet even if you are not aware of it. URL not found on a web-server? You should see a message including 404 - Not found. Well this 404 is a Service Status code in HTTP which mean the page was not found.

Where is this information from?

So I spent a while looking through RFC2616 (HTTP) and RFC959 (FTP) at the and came up with this list of FTP and HTTP ServiceStatus codes.

FTP and HTTP service codes.

Service	ServiceStatus		Description
MSFTP	500			Syntax error, command unrecognized. 
MSFTP	501			Syntax error in parameters or arguments.
MSFTP	502			Command not implemented.
MSFTP	503			Bad sequence of commands.
MSFTP	504			Command not implemented for that parameter.
MSFTP	530			Not logged in.
MSFTP	532			Need account for storing files.
MSFTP	550			Requested action not taken. File unavailable.
MSFTP	551			Requested action aborted. Page type unknown.
MSFTP	552			Requested file action aborted. Exceeded storage allocation.
MSFTP	553			Requested action not taken. File name not allowed.
MSFTP	421			Service not available, closing control connection.
MSFTP	425			Can`t open data connection.
MSFTP	426			Connection closed; transfer aborted.
MSFTP	450			Requested file action not taken.
MSFTP	451			Requested action aborted. Local error in processing.
MSFTP	452			Requested action not taken. Insufficient storage.
MSFTP	331			User name okay, need password.
MSFTP	332			Need account for login.
MSFTP	350			Requested file action pending further information
MSFTP	200			Command okay.
MSFTP	202			Command not implemented, superfluous at this site.
MSFTP	211			System status, or system help reply.
MSFTP	212			Directory status.
MSFTP	213			File status.
MSFTP	214			Help message.
MSFTP	215			NAME system type.
MSFTP	220			Service ready for new user.
MSFTP	221			Service closing control connection.
MSFTP	225			Data connection open; no transfer in progress.
MSFTP	226			Closing data connection. Requested action successful.
MSFTP	227			Entering Passive Mode 
MSFTP	230			User logged in, proceed.
MSFTP	250			Requested file action okay, completed.
MSFTP	257			PATHNAME created.
MSFTP	110			Restart marker reply.
MSFTP	120			Service ready in nnn minutes.
MSFTP	125			Data connection already open; transfer starting.
MSFTP	150			File status okay; about to open data connection.
w3	100			Continue
w3	101			Switching Protocols
w3	200			OK
w3	201			Created
w3	202			Accepted
w3	203			Non-Authoritative Information
w3	204			No Content
w3	205			Reset Content
w3	206			Partial Content
w3	300			Multiple Choices
w3	301			Moved Permanently
w3	302			Found
w3	303			See Other
w3	304			Not Modified
w3	305			Use Proxy
w3	306			(Unused)
w3	307			Temporary Redirect
w3	400			Bad Request
w3	401			Unauthorized
w3	402			Payment Required
w3	403			Forbidden
w3	404			Not Found
w3	405			Method Not Allowed
w3	406			Not Acceptable
w3	407			Proxy Authentication Required
w3	408			Request Timeout
w3	409			Conflict
w3	410			Gone
w3	411			Length Required
w3	412			Precondition Failed
w3	413			Request Entity Too Large
w3	414			Request-URI Too Long
w3	415			Unsupported Media Type
w3	416			Requested Range Not Satisfiable
w3	417			Expectation Failed
w3	500			Internal Server Error
w3	501			Not Implemented
w3	502			Bad Gateway
w3	503			Service Unavailable
w3	504			Gateway Timeout
w3	505			HTTP Version Not Supported