Thursday, August 27, 2009

How to: Access FTP with MAMP

Sometimes you may need FTP access for your local development with MAMP or MAMP PRO. Therefore you can use the FTP server built into Mac OS X. The ftp server is not activated by default. To activate the server follow these steps:

Note: This tutorial uses Snow Leopard 10.6 but in general this also works with older Versions of Mac OS X.
  1. Open System Preferences
  2. Go to "Sharing"
  3. Activate "File Sharing"
  4. Click on "Options"
  5. Acitvate "Share files and folders using FTP"
  6. Click on "Done"
  7. Below the entry "FTP Access: On" you will find a text "Other people can access your FTP server atftp://10.0.1.200/ or browse for “Dirk Eineckes MacBook Pro 17"”."
  8. Write down the IP Address
  9. Close the preferences panel
Now you have activated the FTP server and you can access it with any FTP client like Cyberduck or FileZilla. Per default you will be directed to your home directory. But most commonly you want to access a certain directory on your hard drive instead of accessing your home directory.

How this works we will showcase with the free FTP client FileZilla:
  1. Start FileZilla
  2. Go to File -> Site Manager
  3. Click on "New Site" in the upcoming dialogue
  4. Choose a name at the tree on the left (like "Local")
  5. On the right enter your IP Adress into the field "Host"
  6. Choose "Normal" at the select box "Logontype"
  7. Enter your username into the field "User"
  8. Enter your password into the field "Password". (Username and password are the same which you are using to access Mac OS X)
  9. Click on the tab "Advanced"
  10. Enter your favored directory into the field "Default remote directory". On my system this is: "/Users/dirkeinecke/Documents/Websites/MAMP-Server/test"
  11. Click "Connect"
You are done!

Share/Save/Bookmark

23 comments:

  1. Thanks for the tutorial. Having problems connecting ftp to my computer. I'm using my computer's IP address and FileZilla but still timeout and no connection. Would appreciate any help.

    ReplyDelete
  2. @jeremy are you leopard? You could just ftp to localhost instead using your ip. I have check mine, going to the terminal typing

    ftp localhost

    then entering my mac username and password.

    ReplyDelete
  3. So much for "drag and drop".

    ReplyDelete
  4. I cannot get this to work at all.

    ReplyDelete
  5. This doesn’t work for me. Transmit keeps telling me that the login is incorrect when I use my Mac’s admin account name and password. Or did I get anything wrong there?

    ReplyDelete
  6. Hi!!
    I resolved your post.
    Thank you so much!! ;-)

    ReplyDelete
  7. I got the same Terminal issue, would not allow me to enter a password...what the!?

    ReplyDelete
  8. Enter your username into the field "User"

    What is my username? Is it one i've set up elsewhere or do I invent one?

    ReplyDelete
  9. FYI - this will not work with OSX Lion, as FTP is disabled by default and no longer available in the system preferences. Use the Apple solution below to configure it via Terminal:

    http://support.apple.com/kb/HT4704?viewlocale=en_US

    ReplyDelete
  10. Thanks, I used the first part with Coda and I got it up and running!

    ReplyDelete
  11. Thanks so much. I was so lost but now I feel connected!

    ReplyDelete
  12. Trying to get an ftp access to the MAMP install for WordPress in Lion. I went to the Apple page that Patrick gave us, but I don't see where or how to get the FTP address or the user and password for the ftp connection. Sorry, I'm not very good with terminal. Anyone know?

    ReplyDelete
  13. ftp seems to be deprecated in Lion, there are posts saying it can be done (from the command line) but it's not visible via the settings / OS...

    ReplyDelete
    Replies
    1. spot on! I am going to try Lion FTPD Enable

      Delete
  14. can I show only a folder? when I try to connect, I can see every folders.

    ReplyDelete
  15. I feel the post name "How to: Access FTP with MAMP" is misleading. The content has nothing to do with MAMP.

    ReplyDelete
  16. Look at this solution: http://forum.mamp.info/viewtopic.php?f=2&t=8463 .. Perfect solution.

    ReplyDelete
  17. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.

    ReplyDelete
  18. For anyone still struggling with this in OS X Lion, I found the solution was to use SFTP. Instructions halfway down this page:

    http://osxdaily.com/2011/09/29/start-an-ftp-or-sftp-server-in-mac-os-x-lion/

    ReplyDelete
  19. thanks for the help! worked perfect.

    ReplyDelete
  20. I have been struggling with ftp access to localhost for MAMP and this solved the problem! Thank you

    ReplyDelete
  21. I get ever the same error:
    "Unable to locate WordPress Content directory (wp-content)."

    How can I add child-themes?

    ReplyDelete