Passive FTP
PASV mode
Passive FTP is the mode where the client opens the data connection to a port the server names, which works through firewalls and mobile networks.
FTP uses two connections: a control connection for commands and a separate data connection for each file or folder listing. In active mode the server connects back to the client for data; in passive mode the client asks the server for a port (the PASV or EPSV command) and connects to it. Passive mode is the norm today because devices behind routers and mobile networks can't accept incoming connections.
If an FTP login succeeds but uploads or folder listings hang, the data connection is usually the problem.
How it works
After logging in, the client sends PASV (or EPSV, the extended version). The server replies with an address and port, the client connects, and the file travels over that connection. The server needs a range of passive ports open in its firewall. A common snag is a server behind NAT that replies with its private address; well-behaved clients reuse the server's public address instead.
An example: a camera that won't file
A photographer sets up a camera's built-in FTP to upload to a studio server. It logs in but every transfer times out. Switching the camera's FTP setting to passive mode and opening the server's passive port range fixes it — the camera was waiting for a connection the router would never let in.
Passive mode and CloudTether
When CloudTether delivers to an FTP or FTPS server, it uses passive mode — EPSV first, falling back to PASV — and connects back to the server's public address, so it copes with servers behind NAT. On your server, make sure the passive port range is open. For cameras sending over their own FTP with CloudTether's Cloud FTP, the set-up asks for passive mode on. If firewalls are a constant fight, SFTP avoids the second connection entirely.
Active mode today
Active mode still exists on some old systems and inside closed networks, but almost every client on a phone, laptop or camera should use passive.
Tips and common mistakes
- Login works but uploads hang? Check passive mode and the server's passive ports.
- Configure the server to advertise its public address for passive connections.
- Test from mobile data, not just the office network, before an event.
Put it into practice
CloudTether tethers your camera to your phone and delivers every shot to the cloud, live as you shoot — no laptop.