What is FTP?
Answer
FTP (File Transfer Protocol) is an application-layer protocol for transferring files between a client and server. It uses two TCP connections: port 21 (control connection — commands and responses) and port 20 (data connection — actual file transfer). FTP has two modes: Active (server connects to client for data) and Passive (client initiates both connections — better through NAT/firewalls). FTP transmits credentials and data in plaintext — a significant security risk. Modern alternatives: SFTP (SSH File Transfer Protocol, port 22 — encrypted, completely different protocol from FTP), FTPS (FTP with TLS encryption), and SCP (Secure Copy, also over SSH). SFTP is now the recommended approach for secure file transfer. For web hosting and development, Git and SFTP have largely replaced plain FTP.