FTP (File Transfer Protocol) este un protocol standard de rețea folosit pentru transferul fișierelor între un client și un server printr-o conexiune de rețea bazată pe TCP/IP. FTP permite utilizatorilor să încarce (upload) sau să descarce (download) fișiere de pe un server la distanță. Este folosit frecvent pentru gestionarea fișierelor pe un server de web sau pentru schimbul de date între calculatoare.
FTP funcționează în două moduri principale:
- Modul activ – serverul inițiază conexiunea pentru transferul fișierelor.
- Modul pasiv – clientul inițiază ambele conexiuni (una pentru control și una pentru transfer de date), ceea ce este mai des utilizat atunci când sunt firewall-uri sau NAT.
FTP utilizează două porturi:
- Portul 21 pentru control (comenzi),
- Portul 20 pentru transferul efectiv al fișierelor.
Există și variante mai sigure ale FTP, cum ar fi SFTP (Secure FTP) și FTPS (FTP Secure), care oferă criptarea datelor pentru a proteja informațiile transferate.