I think @Rob Adams is going the right direction, but I disagree with sending 552
, which says you are aborting the transfer; I think that holding the request until they send ALLO
is a more useful approach. Reading through RFC 959:
This (ALLO) command may be required by some servers to reserve
sufficient storage to accommodate the new file to be
transferred...
Section 4.2 lists the valid format of replies, where you can display the error on the first line, and elaborate on the requirement for ALLO
on the 2nd line.
Furthermore, Section 4.2.2 lists this message... 350 Requested file action pending further information.
It seems reasonable that if your server receives a request to store before recieving an ALLO
, it should throw a 350
and hold the transfer until either you get a session timeout, close or they send an ALLO
.