Summary

  • FTP's original restart marker lived inside block or compressed transfer framing. A 110 MARK ssss = rrrr reply paired a sender-owned position with a receiver-owned position, made durable at stable storage.
  • The pair could carry local conversion state, not merely a count. RFC 1123's example requires a receiver to remember that it has already swallowed a carriage return while turning network CRLF into one local newline.
  • RFC 3659 later defined REST STREAM as an octet count for the immediately following transfer, while warning that restart is unsafe if the source or the partial destination has changed. An offset is a continuation instruction — not a file identity, and not an integrity proof.

A receipt that arrived while the cargo kept moving

FTP has always run two conversations at once. Commands and numbered replies cross a control connection; file contents travel on a separate data connection. That split made a strange event possible: while bytes were still pouring down the data channel, the receiving side could slip a 110 reply onto the control channel and announce a place from which both ends might pick up the pieces later.

The corrected form in RFC 1123 is deliberately symmetrical:

110 MARK ssss = rrrr

The string ssss had appeared in the data stream and encoded a position in the sender's file system. The string rrrr encoded the corresponding position in the receiver's. Each marker was minted by one system and would later be read by that same system. The equality sign was therefore a treaty, not a tautology: it did not claim the two strings matched numerically. It claimed they met at one recovery boundary.

Nor was the reply a request to hit the brakes. A sender emitting restart markers was forbidden to assume 110 replies would come back in step. It had to keep sending rather than wait for each checkpoint to return. Recovery evidence was explicitly allowed to lag behind useful work — a design instinct that modern streaming systems rediscover every few years and then announce as new.

Here is the first distinction our progress bars quietly erase. A counter reports how much motion has been observed. A restart checkpoint reports which earlier state both sides can actually reconstruct after a failure. In a simple byte-preserving transfer the two coincide, which is why the difference is easy to miss. FTP was built for systems where they often did not.

The marker needed a box to live in

RFC 959 defined three transfer modes. Stream mode sent an unstructured sequence and normally used the closing of the data connection to signal end of file — an ending the specification itself called inherently unreliable, since a close could not reveal whether the file ended normally or the connection simply died. Block and compressed modes carried their own FTP framing, including explicit end conditions.

In block mode, a three-octet header preceded each block: the high octet held descriptor bits, the lower two held a byte count. Descriptor value 16 meant the block carried a restart marker — a printable character string embedded in the data stream, no spaces allowed. It was not user data, and it was not inferred from TCP sequence numbers. FTP deliberately planted a recovery landmark inside the representation that both data-transfer processes understood.

That choice tied restart to mode, and RFC 1123 later said so plainly: the original mechanism required block or compressed mode precisely because those modes could insert markers into the stream. Frequency could be low. A checkpoint did not have to ride along with every block to earn its keep.

The same machinery explains why a raw packet capture was never sufficient recovery state. A transfer process needed to know where the sender could recreate its outgoing representation and where the receiver could recreate its stored one. Packet delivery supplied neither local fact by itself.

Durability first, then the receipt

On receiving a marker, RFC 1123 said the implementation should force all prior data to stable storage before encoding rrrr. That ordering is what gave the reply its narrow authority. The receiver was not merely saying, "these bytes crossed my socket." It was naming a position after which the preceding portion could survive the interruption model the implementation claimed to handle.

Stable did not mean globally permanent. The RFC defined no storage medium, no replication policy, no disaster-recovery promise. It required only that the local process make earlier data durable enough that its own restart token stayed truthful. The marker belonged to the system that knew what "reposition here" meant.

The user FTP was expected to keep the pair. RFC 1123 proposed a restart control file: create it empty when the transfer begins, append marker pairs as they arrive, delete it when the transfer completes successfully. That small sidecar was a recovery ledger — and if the client crashed, the latest complete pair, not the largest number on the display, was the safe candidate for another attempt.

Deletion mattered as much as creation. A finished transfer should not leave an apparently valid checkpoint lying around for some unrelated future file. Lifecycle was part of meaning: create at start, append only committed pairs, consume for the same interrupted transfer, remove on success.

The checkpoint that was half a newline

Why two opaque strings instead of one honest integer? Because FTP could transform data between its network representation and each system's storage representation, and a location on the wire did not always map to the same location on disk.

RFC 1123 offers an exact example. In an ASCII transfer, a receiver might turn the network sequence CRLF into a single local LF. Suppose a restart marker fell between the CR and the LF. The receiver had already seen and discarded the CR but had not yet completed the newline transformation. Its rrrr value therefore had to encode not only a file position but the state "CR has been seen." Restart from a bare integer disk offset and you can add, lose or duplicate a character — a one-byte bug that quietly corrupts everything downstream of it.

This was not ornamental heterogeneity. RFC 959 describes machines with different character codes, word sizes, local byte sizes and storage conventions. FTP kept representation type, file structure and transfer mode as separate parameters precisely because "the same file" had to cross unlike systems without pretending their internal layouts were identical.

A marker could therefore be opaque and still exact. Its portability was intentionally limited: only the system that generated a token had to interpret it. The protocol coordinated correspondence, not a universal storage coordinate system.

Direction decided who held which token

RFC 1123 works through three cases. In a user-to-server transfer, the user side inserts ssss; the server commits prior data, generates rrrr and returns the pair. To resume, the user repositions itself with its own ssss and sends REST rrrr to the server.

For server-to-user retrieval, the server inserts the stream marker. The client commits its local copy, records the corresponding local state, and later restores its own position and hands the server's marker back through REST.

The third-party case is the revealing one. FTP permitted a single user process to control a transfer between two servers. That user held a checkpoint pair belonging to machines which might never share a file-system model. To restart, it sent the sender only the sender's token and the receiver only the receiver's token.

The client was a custodian of correspondence, not the author of either coordinate. That division reduced what a coordinator had to understand — and imposed a discipline: marker pairs could not be mixed across transfers, reordered casually, or read by the wrong endpoint.

REST saved state; it did not move a byte

The REST command established a parameter for the next service command. A successful 350 reply meant the server had saved the marker and expected a transfer command. It did not mean any file bytes had moved, that the partial object was valid, or that completion would succeed.

RFC 959's state model pairs REST with a following RETR, STOR or APPE. RFC 1123 adds distinct error meanings: a 554 can say the requested restart position cannot be applied; a 555 can say the current type or structure does not match the existing file. Position and representation are separate conditions, and one successful check cannot silently satisfy the other.

This two-command construction also breeds stale state. Set a restart marker and then fail to issue the intended transfer, and the next operation can inherit an instruction whose purpose has already evaporated. Later work would make the adjacency rule considerably more explicit.

STREAM mode shrank the checkpoint to arithmetic

By the time RFC 3659 documented FTP extensions, clients and servers mostly wanted restart in ordinary STREAM mode — which carried no embedded FTP restart markers at all. The extension therefore picked a simpler coordinate: decimal octets.

In STREAM mode, REST 802816 tells the server not to send the first 802,816 octets of the immediately following transfer. The RFC's example sets image type, verifies the server file has not changed, receives 350, then issues RETR. REST 0 clears the restart effect and requests the whole file.

The simplification was powerful because image-mode octets give both sides a common coordinate. It was also deliberately narrower than the paired-marker model. The number did not encode a receiver's half-finished character conversion. It did not identify the source version. It did not assert that the client still held exactly the prefix it claimed.

RFC 3659 therefore made sequence part of correctness. REST must be the last command before the transfer it modifies. If the client cannot successfully send that transfer command, it should issue REST again before trying later. If the next transfer should begin from the start, it should explicitly send REST 0.

Syntax and feasibility also fail at different moments. A nonnumeric STREAM marker can be rejected immediately. A syntactically valid but out-of-range marker may only be rejected once the following transfer command supplies the file and the operation context. Parsing a coordinate is not proof that the coordinate applies.

Resuming a store had a sharper edge

Restarting a retrieval leaves assembly authority with the client. It can place the returned suffix beside the prefix it already holds, re-fetch the overlap, or throw the result away. Restarting a store asks the server to write incoming octets into an existing partial object — which gives a stale or mistaken offset far more destructive power.

RFC 3659 limits the intended use to completing a previously failed transfer. For STOR, behavior is undefined if the restart marker is not at the end of the data already stored by the server, and undefined if the continuation supplies too little data to extend the destination at least to its earlier size. APPE, where a server permits it after REST, must act like STOR at the chosen position rather than append blindly.

These rules stop the restart command from quietly becoming a general sparse-file editing interface. They do not make continuation transactional. A failed second attempt can still leave another partial file, and the operator must decide how partial destinations are named, protected, verified and removed.

The offset still needed evidence about the object

A perfectly parsed offset can point into the wrong version. RFC 3659 therefore recommends checking modification information before restart. For RETR, the client should obtain the server file's modification time before the first transfer and compare it again before continuing. For STOR, it can compare the partial destination with the source it is about to resume. MLST facts can give a stronger indication that the object has changed.

The warning is careful. Clients and servers need not share synchronized clocks, and time comparisons must allow for skew. A modification value can change for reasons other than different final content; content can change and later return. The evidence is an invalidation signal, not a cryptographic identity.

Size is contextual too. RFC 3659 defines a transfer size suitable for REST under the current type; it is not necessarily a universal on-disk size. A matching size cannot prove matching bytes, and a correct prefix plus a correct suffix still needs whole-file verification if integrity matters.

The protocol therefore splits resumption into at least four claims: the feature is supported, the marker grammar is understood, the source and partial destination still belong to the same transfer, and the reconstructed result is correct. REST STREAM answers only the first two directly.

Feature advertisement named a capability, not a promise

A server supporting the RFC 3659 STREAM behavior advertises REST STREAM through FEAT. The exact token lets a client distinguish the numeric STREAM extension from restart support available only in block or compressed mode.

The current IANA FTP Commands and Extensions registry preserves the distinction. It lists base REST with RFC 959 and RFC 1123, and an amended REST+ entry for STREAM mode with RFC 3659 and the FEAT code REST.

That registry records a standardized command family. FEAT reports an implementation capability. Neither identifies a particular partial file, authorizes overwriting it, proves the remote version is unchanged, or measures how widely the mechanism is deployed today.

Recovery worked by keeping meanings local

FTP's two restart designs are not a tidy story in which an awkward token was replaced by a sensible number. Each is sensible inside a different representation boundary.

The original scheme could survive conversions because sender and receiver each described their own state. It demanded framed transfer modes, in-stream markers, asynchronous control replies and a persisted pair ledger. The later STREAM scheme fit the dominant octet stream and the common image transfer. It removed embedded markers and made resumption easy to express — and handed more responsibility to the client to prove its offset still referred to the intended file.

In both cases the checkpoint had less authority than the completed object. It told endpoints where they might continue. It did not authenticate who supplied the file, certify its meaning, or replace verification after assembly.

A checkpoint was never a measurement. It was a promise two machines made to each other about where they could meet again — and the modern octet offset is that promise with the witnesses dismissed.

Sources and evidence limits

The closed sources establish FTP's specified restart mechanisms, host requirements, later STREAM extension and command registry. They do not measure current product support, present deployment, transfer success rates or the integrity behavior of any particular server. The article therefore does not treat an IANA entry or a FEAT token as evidence that a real continuation is safe.