FTP Algebraic Formal Modelling using ACP 
Study on FTP Active Mode and Passive Mode 
Pedro Juan Roig, Salvador Alcaraz and Katja Gilly 
Department of Physics and Computer Architecture, Miguel Hernández University, 
Avda. Universidad, s/n, 03202 Elche (Alicante), Spain 
 
Keywords:  ACP, Formal Protocol Specification, FTP, Networking. 
Abstract:  FTP is a well-known network protocol aimed at transferring computer files between two end devices, 
following a client-server approach. In this paper, we are focusing on getting a formal description model for 
both FTP modes, namely active and passive, by using manual algebraic derivations related to Algebra of 
Communicating Processes (ACP) as a tool for achieving such a formal protocol specification. For that 
purpose, the most commonly used FTP commands are going to be studied by applying ACP rules, proving 
that the model proposed meet the expected behaviour of FTP sessions. 
1 INTRODUCTION 
FTP stands for File Transfer Protocol and is one of 
the eldest communication protocols used on 
computer networks. The original specification was 
written in the early seventies but the current 
specification was released in the middle eighties 
(RFC 959, 1985). 
Back then, security concerns were not much 
taken into account, but as time went by, security 
breaches happened and needed to be addressed. 
Therefore, further amendments were proposed in the 
nineties such as (RFC 1579, 1994) and (RFC 2228, 
1997) in order to cope with them.  
Those extensions did not make FTP a secure 
enough protocol, as information travels in plain text 
throughout the network. That is why it is nowadays 
recommended to replace FTP with a more secure 
protocol, such as SecureFTP (SFTP) or Secure Copy 
Protocol (SCP), as they both provide encrypted 
capabilities due to SSH usage. 
All the above protocols work with TCP, hence 
they implement error checking techniques and 
acknowledgement (ACK) messages. On the other 
hand, when transferring files within a secure Local 
Area Network, Trivial FTP (TFTP) is quite often 
substituted for FTP as it is much faster because of 
working with UDP, although none of the above 
features apply. 
Nevertheless, FTP is still of much use in all kind 
of computer networks as per today, so its formal 
specification is fully justified. 
Regarding communication protocols, they may 
well be described by using Formal Description 
Techniques (FDTs), as they provide unambiguous 
descriptions, more precise than any other informal 
descriptions made in natural languages (Turner, 
1993). 
There are some FDTs around, each one suiting 
different kinds of protocols, but process algebras 
(Padua, 2011) may be the more adequate ones in 
dealing with concurrent distributed protocols. 
Among them all, Algebra of Communicating 
Processes (ACP) is the preferred one as it represents 
such protocols as a set of equations according to its 
behaviour, thus abstracting away from its real nature 
(Fokkink, 2007). 
Regarding the formal description of FTP by 
using ACP, there is not such information in the 
literature. Therefore, in this paper we are going to 
build up a model for a user and a server both 
interacting by means of FTP in diferent situations, in 
order to obtain the formal specification and 
verification of such a model. 
The organisation of this paper will be as follows: 
first, Section 2 introduces FTP behaviour, then, 
Section 3 shows some common FTP return codes, 
next, Section 4 states the difference between Active 
mode and Passive mode, after that, Section 5 
presents the FTP model proposed, later, Section 6 
performs the specification for the model proposed 
focusing on running general commands, and in turn, 
Section 7 studies specific commands run in Active 
mode, whereas Section 8 does it in Passive mode,