Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • YouTube Videos
  • Top Categories
  • Subscribe via Email
  • Ask A Question
  • Meet Dave
  • Home
  • Linux Help
  • Why do my FTP transfers all freeze up?

Why do my FTP transfers all freeze up?

April 8, 2006 / Dave Taylor / Linux Help, Mac & MacOS Help / 17 Comments

I’ve been trying to copy some files off an FTP archive, but every time I go to do the transfer, it says “Entering Extended Passive Mode” and never gets any further. My conclusion: this passive mode thing is a bust. How can I transfer the files without using passive mode? I’m using ftp from within a Terminal on my Mac, by the way.

This is a somewhat common problem with FTP, actually, and while I admit that I’m not entirely sure what passive mode is either, I do know how to get around it within the ftp program. Here’s an example of me grabbing a file from the O’Reilly Media server:

$ ftp ftp.oreilly.com
Connected to ftp.oreilly.com.
220 ProFTPD 1.2.10 Server (ftp.oreilly.com) [172.31.173.9]
Name (ftp.oreilly.com:taylor): ftp
331 Anonymous login ok, send your complete email address as your password.
Password:
230-Welcome to the O’Reilly & Associates, Inc. FTP Archive.
230 Anonymous access granted, restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> get /demo/demofile.zip demofile.zip
local: demofile.zip remote: /demo/demofile.zip
229 Entering Extended Passive Mode (|||64758|)

That’s as far as it gets. Like you, my connection hangs. Fortunately, fixing it is as easy as typing in a single command into the ftp program: EPSV.
Now watch what happens:

^C
receive aborted. Waiting for remote to finish abort.
ftp> epsv
EPSV/EPRT on IPv4 off.
ftp> get /demo/demofile.zip demofile.zip
local: demofile.zip remote: /demo/demofile.zip
227 Entering Passive Mode (209,58,173,9,252,250).
150 Opening BINARY mode data connection for /demo/demofile.zip (4908794 bytes)
100% |***************************************************| 4793 KB 163.08 KB/s 00:29
226 Transfer complete.
4908794 bytes received in 00:29 (162.48 KB/s)
ftp>

That’s all there is to it. Hope that helps you get your FTP transfers going again too!

About the Author: Dave Taylor has been involved with the online world since the early days of the Internet. Author of over 20 technical books, he runs the popular AskDaveTaylor.com tech help site. You can also find his gadget reviews on YouTube and chat with him on Twitter as @DaveTaylor.

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!
extended passive mode ftp, file transfer, ftp

17 comments on “Why do my FTP transfers all freeze up?”

  1. Biz says:
    March 28, 2013 at 6:39 pm

    Use to be, from Linux (SLES mainly) I would get the
    229 Entering Extended Passive Mode (|||####|) error.
    Then long pause and then it worked.
    Then, about a year or two ago, it would just fail with something like:
    421 Service not available, remote server timed out. Connection closed
    SO, I started to enter “PASS” before I did anything and that seemed to fix it.
    Now, it still fails and I have had to enter:
    “EPSV”
    And it is back working… Thank God. So, what is happening? I have been doing these FTP’s from basically the same Linux system. I cannot speak for the remote system… They may have upgraded or something? What will be the next failure and what command will I use then?

    Reply
  2. Tsunami says:
    March 23, 2012 at 4:57 am

    I tried epsv, that didn’t work for me. This did:
    ftp> passive
    Passive mode: off; fallback to active mode: off.

    Reply
  3. Senica says:
    November 18, 2010 at 2:24 pm

    Thanks for the information. This works perfectly for me. I’m wondering if the passive command can work automatic like via a command procedure
    $ ftp/type=ascii server_name /user=user1 /pass =user1$ /pasv dir
    When I run this command via a procedure, it still hangs. But when I ftp manually, it works.
    Your help is appreciated!
    Thanks!

    Reply
  4. Enzo says:
    September 2, 2010 at 11:47 am

    FTP is trickier than most people think. The client initially connects to the server on port 21. The server will communicate back to the client on its outbound port 20, but the port that it connects to on the client can be any port > 1023 depending on which mode the client is in. The client can be in ACTIVE or PASSIVE mode.
    If the client is in ACTIVE mode, it tells the server how to connect back to the client, including a port number > 1023. Each time you do a transfer or dir command, this will be a different port number.
    In PASSIVE mode, the server tells the client whic ip address & port number to connect to. The server can typically be configured to specify a range of ports for the passive mode.
    Here’s a full overview.
    http://www.ncftp.com/ncftpd/doc/misc/ftp_and_firewalls.html#TwoTypes

    Reply
  5. asish says:
    July 15, 2010 at 12:03 am

    Hii Dave ,
    I am using a GPRS modem for my FTP application.I need to transfer some file from remote area to server. I am testing it through Filezilla. Pc is able to send file to server , but when my Modem connects , its fine but when i want to send a file , its getting hang at (27.57.153.59)> 227 Entering Passive Mode (59,90,235,221,0,22) . I have set the time out period to 0. Any idea ?

    Reply
  6. Vipin Yadav says:
    June 14, 2010 at 6:42 am

    I have AIX5.3 server.I have lost root password,please tell me how to set the new root passsword

    Reply
  7. Vipin says:
    March 3, 2010 at 5:49 am

    Its a AIX 5.3 Client

    Reply
  8. Vipin says:
    March 3, 2010 at 5:47 am

    HI Dave,
    Recently i had a situation in which 1 user was able to do ftp to cleint but another was not.I checked /etc/ftpusers file,/etc/security/login.cfg file,ftpd daemon,/etc/security/passwd all was fine.But another user was not able to see the files under directory as 1st user can do.I can’t figure out difference if any as i checked everything.
    Please help.

    Reply
  9. Chris E says:
    March 10, 2009 at 7:30 am

    Thanks for posting this, it helped me!

    Reply
  10. David says:
    September 5, 2008 at 11:41 am

    I am trying to get FTP to work between two SUSE servers and I have used the epsv command.
    When I try to transfer a file or do a dir command it hangs.
    Is there a solution?

    Reply
  11. Lane says:
    December 6, 2007 at 8:57 am

    Thanks Dave,
    This worked perfectly on the Solaris box we were grabbing data from! Had tried quote PASV before with no success.

    Reply
  12. James Howard says:
    November 30, 2007 at 1:27 pm

    The general rule is that if you have a local NAT/firewall you’ll want to use passive mode, and if you have a remote firewall, you’ll probably need to use active mode.
    EPSV is a function of the remote server. If EPSV isn’t working for your specific remote server, try PASV.
    Use the PASV and EPSV command to cycle passive mode off and on. Passive mode is on by default in most FTP clients.

    Reply
  13. Lylo says:
    March 24, 2007 at 3:09 am

    I’m experiencing this problem with two FTP servers. The EPSV off fix works fine one one (dataflame.co.uk) but failed on the other (p4host.com).
    I have tried turning the OSX firewall off completely but this makes no difference. I have tried the terminal, Cyberduck and Yummy FTP — same problem with all of them.
    I’m running OSX 10.4.9 on an Intel Mac.
    Can anyone help?!

    Reply
  14. Tom Schneider says:
    December 15, 2006 at 1:08 pm

    Oh, it accepts lower case!
    ftp> epsv
    EPSV/EPRT on IPv4 off.
    but it still hangs in ‘Entering Passive Mode’.
    Eventually it said
    200 PORT command successful.
    421 Service not available, remote server timed out. Connection closed
    ftp>
    Interestingly it created an empty file on the
    remote computer where I was putting the file.

    Reply
  15. Tom Schneider says:
    December 15, 2006 at 1:03 pm

    On my Mac OSX 10.4.8, this failed:
    ftp> EPSV
    ?Invalid command.
    HELP!!
    Also, is there a way to configure this automatically?

    Reply
  16. TD says:
    April 18, 2006 at 8:38 am

    FTP Passive mode is used by most FTP programs with the prevalence of firewalls. The FTP protocol uses 2 ports (one for transfer one for control). When a file is requested the requestor sends a message to the server on the control connection. Then the server responds to the receiver by initiating a transfer connection to the requestor… but if there is a firewall, the transfer connection can’t be made since the firewall will likely block it. So passive mode adds some protocol steps where the server opens up a port for the requestor to connect to for the transfer connection, sends that information to the requestor over the control channel, and the requestor makes the transfer connection. So in passive mode, all connections to the server are initiated from the requestor so they are allowed by the firewall.

    Reply
  17. Chris Buechler says:
    April 8, 2006 at 8:52 pm

    That may fix it, and may not.
    FTP gets ugly on today’s Internet, because it was designed in the 1970’s, long before firewalls were common and before Network Address Translation (NAT) existed. The near universal use of firewalls and NAT on the Internet today make FTP problematic at times.
    This document explains the issues and work arounds very well.
    http://www.ncftp.com/ncftpd/doc/misc/ftp_and_firewalls.html

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Recent Posts

  • Making the Most of The New Windows 11 File Explorer
  • How to Cancel Your “Apple Music” Subscription Correctly
  • Quick Tweaks to Prevent Google Personalized Search Suggestions
  • How to Pair Bluetooth Earbuds with your Apple Watch
  • My Windows 11 is in the Wrong Timezone! How Can I Fix It?

On Our YouTube Channel

Casio ProTrek PRG601-PE5 Pendelton Outdoors Watch -- DEMO & REVIEW

Joyroom 120W 3-Port USB Fast Car Charger -- REVIEW

Categories

  • AdSense, AdWords, and PPC Help (106)
  • Alexa, Kindle, and Nook Help (103)
  • Amazon, eBay, and Online Shopping Help (166)
  • Android Help (238)
  • Apple iPad Help (151)
  • Apple Watch & Smartwatch Help (56)
  • Articles, Tutorials, and Reviews (346)
  • Auto Tech Help (20)
  • Business Advice (201)
  • Chromebook & ChromeOS Help (45)
  • Computer & Internet Basics (795)
  • d) None of the Above (166)
  • Facebook Help (386)
  • Google, Chrome & Gmail Help (195)
  • HTML & Web Page Design (248)
  • Instagram & Threads Help (52)
  • iPhone & iOS Help (639)
  • iPod & MP3 Player Help (173)
  • LinkedIn Help (90)
  • Linux Help (178)
  • Linux Shell Script Programming (90)
  • Mac & MacOS Help (930)
  • Most Popular (16)
  • Outlook & Office 365 Help (39)
  • PayPal Help (68)
  • Pinterest Help (54)
  • Reddit Help (21)
  • SEO & Marketing (82)
  • Spam, Scams & Security (101)
  • Trade Show News & Updates (23)
  • Twitter Help (225)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows PC Help (976)
  • Wordpress Help (206)
  • Writing and Publishing (72)
  • YouTube Help (47)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (65)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2023 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy