FileZilla Passive vs Active Mode

Understanding and fixing FTP transfer mode issues

One of the most common FileZilla issues is the "Failed to retrieve directory listing" error. This is almost always caused by incorrect FTP transfer mode settings (passive vs active). This guide explains the difference and how to fix mode-related connection problems.

Common Error Message

Error: Failed to retrieve directory listing

If you see this error, the transfer mode (passive vs active) is likely misconfigured.

✓ Quick Fix

  1. 1.
    Open File → Site Manager
  2. 2.
    Select your site
  3. 3.
    Go to Transfer Settings tab
  4. 4.
    Select "Passive" transfer mode
  5. 5.
    Click Connect

Still not working? Try "Active" mode instead, or read the detailed explanation below.

Understanding Passive vs Active Mode

📥 Passive Mode (Recommended)

In passive mode, the client (FileZilla) initiates all connections to the server.

How it works:

  1. Client connects to server on port 21 (command connection)
  2. Client asks server: "What port should I use for data?"
  3. Server responds with a port number
  4. Client connects to that port (data connection)

✓ Pros:

  • Works with routers and NAT
  • Works behind firewalls (client-side)
  • No port forwarding needed on client
  • Default and recommended setting

✗ Cons:

  • Requires server firewall configuration
  • May not work on very restrictive networks

📤 Active Mode

In active mode, the server initiates the data connection back to the client.

How it works:

  1. Client connects to server on port 21 (command connection)
  2. Client tells server: "Connect back to me on port XXXX"
  3. Server initiates connection to client's specified port

✓ Pros:

  • Simpler server-side firewall rules
  • Better for some legacy servers

✗ Cons:

  • Doesn't work behind NAT/routers (usually)
  • Requires client firewall configuration
  • May need port forwarding on router
  • Less secure (server connects to client)

Which Mode Should You Use?

🏠
Home Users / Behind Router

Use Passive mode. It works with routers and NAT without special configuration.

🏢
Corporate Network / Firewall

Use Passive mode. Ask IT if there are issues; they may need to allow outbound connections.

🌐
Public WiFi / Hotel Network

Use Passive mode. Better compatibility with restrictive networks.

🖥️
Direct Server Connection (no router)

Either mode works, but Passive is still recommended.

💡 Bottom line: Use Passive mode unless you have a specific reason not to.

How to Change Transfer Mode

Per-Site Settings (Recommended)

  1. Open Site Manager: File → Site Manager (Ctrl+S)
  2. Select your site from the list
  3. Go to "Transfer Settings" tab
  4. Transfer mode: Select one of:
    • Default - Uses global setting
    • Active - Forces active mode
    • Passive - Forces passive mode (recommended)
  5. Click Connect

Global Default Setting

  1. Open Settings: Edit → Settings
  2. Navigate to: Connection → FTP
  3. Transfer mode: Select "Passive (recommended)"
  4. Click OK

Still Having Issues?

Try Both Modes

If passive doesn't work, try active (or vice versa). Some servers are configured to work with only one mode.

Check Firewall Settings

For passive mode:

  • Allow FileZilla in your firewall
  • Make sure firewall allows outbound connections on high ports (1024-65535)

Contact Server Administrator

Ask if the server supports passive mode and what port range is used for passive connections. Some restrictive corporate firewalls may need those ports opened.

Use SFTP Instead

SFTP doesn't have passive/active modes - it uses a single connection. If FTP continues to cause problems, ask your host if SFTP is available.

Technical Details (Advanced)

Ports Used

Active Mode:

  • Command: Client port (random high port) → Server port 21
  • Data: Server port 20 → Client port (specified by client)

Passive Mode:

  • Command: Client port (random high port) → Server port 21
  • Data: Client port (random) → Server port (specified by server, usually 1024-65535)

FTP ALG (Application Layer Gateway)

Some routers have "FTP ALG" which tries to help with FTP connections but often causes problems. If you have persistent issues, try disabling FTP ALG in your router settings.

✓ Problem Solved?

Frequently Asked Questions

Should I use passive or active mode?

Use passive mode in most cases, especially if you're behind a router or firewall. Passive mode is more compatible with modern network setups and is the default in FileZilla.

Why can't I retrieve directory listing?

This usually means the FTP transfer mode is incorrect. Try switching from active to passive mode (or vice versa) in Site Manager transfer settings.

Does SFTP use passive or active mode?

SFTP doesn't use passive or active modes - those only apply to FTP and FTPS. SFTP uses a single SSH connection for everything.

Can I set default mode for all connections?

Yes! Go to Edit → Settings → FTP → Transfer mode and select your preferred default. You can still override this per-site in Site Manager.

;