iEntry 10th Anniversary Rumors News

Mac Server Series: Setting Up FTP On Your Mac


Welcome to the site. Our most popular posts are a series of video tutorials on How To Use Your Mac As A Server. We also answer your Mac questions. Just Ask FMB Feel free subscribe to our RSS feed. Thanks for visiting!

Image
This week we are going to take a look at FTP (file transfer protocol) servers. This is an incredibly useful way to share large files and to update your website.

If you haven’t watched the other videos in the Server Series, you’ll want to be sure and look at those first. This tutorial on FTP assumes that you already have a static ip set up on your machine. We mentioned this in the Web Server Video.

Shownotes:

  • Macminicolo.net If you’d like to put these tutorials to use, you may consider colocating your mini. Colocation means that your mini will be stored in a secure data center with a super high speed connection. It’s inexpensive and simple.
  • Wikipedia: FTP- More information on FTP and how it works
  • Transmit- This is my favorite FTP client. It costs $17.95, but has great features.
  • Cyberduck- If you’re looking for a free FTP client, look no further. Cyberduck is the best option.

You can watch the video here.

Errata:

  • The “initial path” in Transmit (or Cyberduck) should be written with slashes not backslashes. For example, “/www” or “/Users/george/Sites”.
  • When using Secure FTP, the port number is typically 22.

27 Responses to “Mac Server Series: Setting Up FTP On Your Mac”

  1. Joe Says:

    What if you want to limit the disk where someone can leave files? Giving access to the entire user directory can create confusion as to where files should be left.

    Thanks again for all your hard work.

  2. Andreas Says:

    Brian,

    this is an absolute fabulous series, thank you very much for making this videos!

    I consider buying a Mini and using it as server, so you information a very helpful. When will you tell how to attach a personal domain name to a site, as promised in episode 2?

    Best regards from Aachen, Germany

    Andreas

  3. Patrick Says:

    Hi Brian,

    first of thanks for this cool series. It sure has helped me setup and secure some of our mac’s here. And we are thinking about switching all of our internet servers to mac’s now :)

    Now I do have a few questions about your last episode:
    - is it possible to chroot the users (or preferably some of them) into their homedirectory
    - is it possible to have an anonymous ftp login

    Thanks and keep up the good work :)

    Greetings from Lübeck, Germany (the marzipan capitol of the world ;)
    Patrick

  4. Richard Says:

    Joe: Mac OS X Server makes it very easy to set fine-grained permissions and to share (or not share) any folder on the disk. With plain Mac OS X client, it’s possible but much harder. See the macosxhints.com article share any folder or volume for more information. You might also consider simply creating a new user and giving out that login information. You could even delete that user’s Movies, Music, and Photos folders so when people login there’s no confusion as to where to put files.

  5. Richard Says:

    Patrick: As I mentioned to Joe, Mac OS X Server makes it easy to do this sort of fine-grained control. WIthout it you’ll have to do some tweaking. Here are some references:

    Enabling anonymous FTP

    Setting up a chroot jail on Mac OS X 10 10.4 (with the caveat that this is broken as of 10.4.7, but the author is working on a fix.)

  6. Patrick Says:

    Richard: Thanks for the Info and the Links, that was what I was looking for. As to the Os X Server, the problem is that it costs, what, around $500,00 and if all I need is the anonymous ftp and the chroot jail and that takes me about 30 minutes to set up on Regular Os X that would make about ( 0,5 hours x $100 = $50 ) so a savings of $450 ;) Don’t get me wrong Os X Server is an awsome piece of software but in a small company with a limited budget it sometimes is overkill ;)

  7. Richard Says:

    Andreas: To use your own domain name with a dynamic IP address (your Mac) you’ll probably need to use DynDNS’s “Custom DNS” product, which isn’t free but isn’t expensive.

    1. Go to your domain registrar and point the name servers of your domain to DynDNS (ns1.mydyndns.org and ns2.mydyndns.org).
    2. Use a DynDNS client on your Mac to always send your latest dynamic IP address to DynDNS.
    3. Edit the Apache configuration file at /private/etc/httpd/httpd.conf and change the ServerName directive in Section 2 to whatever your domain is (www.andreasgerads.de or whatever.)
    4. Restart Apache.
    5. If you have a router between your Internet connection and your computer, you’ll need to set up some kind of port forwarding.

    That should be it — let me know if you have any questions.

  8. Query Says:

    How about a MySQL set-up tutorial? That would be nice, because I never could get it working properly on my Mac.

  9. Andrew Says:

    Brian,
    Great series of tutorials. Congratulations.
    I, however, have a memory like a sieve. Could you advise an address from where I could down load your movies, so that i may replay them at a later time.

    In looking at these tutorials, it has occured to me that this would be an ideal way to split up my companys files for our internal network and have a mini each powering say - 1. the accounting system (very slow MYOB); 2. Filemaker Databases; 3. Spreadsheets & Word processing docs; 4. And so on. Your comments?

  10. Brian Says:

    Andrew, your best bet is to go thru the posts in the Server Video Category.

    http://www.freemacblog.com/category/server-video-series/

    They are all there still

  11. Francois Says:

    Setting up a server is by no means easy when you have no clue where to start. In general, I’d consider myself relatively computer literate - I use Virtue Desktops, QuickSilver, Synergy, Automator, etc. -, but setting up a server is something that has frustrated me for years. The documentation available on the net is generally geared toward people who already have a solid background in computer science, a group to which I don’t belong, so my most sincere thanks for these fabulous tutorials. You are truly helping the average Joe to do more.

    One little thing though: I think it would be great if you used freeware as much as possible in the tutorials. Although the Transmit license isn’t particularly expensive, a 20$ here and there can quickly turn into 150$ if you need several of these cheap apps to get the job done. And if you are trying to recycle several old Macs into servers, then the software bill can quickly escalate, which is why I think you’d be doing us all a great favour if you could use a free app instead of a not-so-free one whenever the free app does the job. After all, this site is freemacblog.com, so I assume that many in your target audience would appreciate it.

    Finally, I have a technical question. My server and client are connected to the same router. Using Cyberduck, I can easily find my server through the Bonjour sub-menu and connect to it. Everything works fine. However, when I tried to connect to the server using the external IP address set up through Dynamic DNS, I get a “Network Error: Operation timed out”. I’m not sure if it has anything to do with the fact that the two computers are on the same router - or that there is a router at all -, but I thought this would allow me to test external connections to my server. I’ll review the previous tutorials and check Cyberduck’s forum for more information, but if anything’s obviously wrong to you, feel free to let me know. :-) Thanks again for the great tutorials!

  12. Setting up My macMini as a FTP Server at Blomfeldt.eu Says:

    [...] FreeMacBlog.com » Blog Archive » Mac Server Series: Setting Up FTP On Your Mac [...]

  13. Addicted Says:

    Hi .. no episode for this week? Its already Wednesday but i can’t seem to the next in the series? Or none are coming up this week?
    Thanks

  14. JC Says:

    This “/” is a slash, or forward slash.
    This “\” is a backslash.
    Thank Micro$oft for confusing the public about these two. And leave it to Micro$oft
    to pick the backwards leaning one as their filename seperator. How appropriate.

    I mention this because you said ‘backslash’ in the program and I’m SURE you really
    meant slash (or forward slash, but why use all those unnecessary syllables)?

  15. PT Says:

    Thanks for the videos! Very informative. You show how to connect using FTP and Secure http://FTP. It appears that the client can choose either and the uninformed user would probably just use the unsecured http://FTP. Can I force the server to only allow Secure FTP therefore clients would have to use Secure FTP?

  16. RKM Says:

    PT: If you turn on Secure FTP (”Remote Login”) but keep “FTP Access” turned off, the uninformed user will receive an error if trying to connect by unsecured http://FTP. That should do it.

  17. PT Says:

    Is there any file size limitations of what can be transferred to and from an FTP server running on a MacMini? Can it handle a 150MB file?

  18. mhar Says:

    Hey, this is a great tutorial for the novice such as myself, but … I can’t get it to work. I have checked the ftp enable on the Mac Mini, followed all your instructions, and Cyberduck on the PowerBook can find it and login successfully, but it won’t list the directory. It just times out. Any help?

  19. mhar Says:

    Ah, the Firewell was on on the Mac Mini. I turned it off and away we went. I’d prefer to have it on, of course, so I’ll work on it.

  20. JulesInFrance Says:

    I have one observation, that goes to “utility”.

    When setting up the web-server (video#2) the series focussed on the root server (being the one at /library/webserver/documents/) yet this space is not accessible via the FTP server.

    I guess if I setup a special user, and created an alias between the user account and the library/webserver/documents folder that would do?

    Or is there a more elegant/secure alternative?

    JiF

  21. zmip Says:

    What’s the use of setting up a secure FTP connection when you also leave the door open through unsecured FTP access? Turn OFF “FTP Access” when you’ve turned on “Remote Login”. It’s either one, not both, like the guy shows us. I’d say that’s another error in the movie.

  22. lulu Says:

    Hello FMB,

    Fantastic tutorial for http://FTP. I knew nothing about it before I started, now it seems so simple and less daunting. I do have some questions though:-

    1. If using secure ftp is it necessary to both FTP Access on and Remote login, if one chooses to use secure ftp only?
    2. What port does SFTP use? do I need to open a port other than 21 on my router?
    3. How do I allow access to Library/Webserver/Documents/MySite? FTP/SFTP only allows access to my home folder.
    4. How can I restrict access to a particular file path?
    4. Finally, and this goes to the heart of the usefulness of allowing FTP access to my computer from external sources. Do I have to give the name and password of my computer out to people I do not know, in order to let them have access to my computer files.

    lulu

  23. Jorge Perez Says:

    Brian te escribo en espaniol porque llevo solo unos meses en USA, tu trabajo es exelente recien me compre un MacBook y cada dia aprendo algo nuevo con tus lecciones, es digno de admirar tu capacidad para transmitir conocimientos al resto de las personas, que Dios te bendiga y te de salud, dinero y larga vida.

    Muchas gracias Jorge, Miami, Florida

  24. TranslationGuy Says:

    Translation of Jorge Perez:

    Brian, I’m writing in Spanish because I’ve only been in the USA for a few months. Your work is excellent. Recently I bought a MacBook, and each day I learn something new with your lessons. Your ability to communicate your knowledge to the rest of us is worth of admiration. God bless you and give you health, money and long life.

    Thanks a lot, Jorge, Miami, Florida

  25. Nathaniel Says:

    I have a question. I want to access the mac mini at work from home. I store all my pertinent files on an external hard drive that is connected to the mac mini. Is there a way to access the drive via s/ftp? If I were to make an alias to the drive and put the alias on my desktop, would that work? Thanks so much!

  26. Maria Says:

    Hello
    I also have a question. I want to have a public folder for my costumers. I´m trying to configure that, but it always end up whit me shearing all my folder on my mac, insted of just one??

    Thanks, I love your Server Series.

  27. zensflare Says:

    This is cool, but I have another thing:
    from cyberduck, when u r connected to the server via FTP, you are in the folder /Users/accountname
    if you just go to the root path from the dropdown menu on the top of the window (/) you can see every system file, database file, hidden folders, etc…
    if someone can see them, the next step is a little hack, and you have more access via the FTP than if you were an admin. or even the root user.
    is there a way to not allow the users to go out from the /Users/accountname folder?
    thankyou

Leave a Reply