How to activate FTP server on OSX

So, you’re running a development server on your OSX machine, ey?

No, how do you easily update your WordPress setup? Or install WordPress Plugins? You need FTP connectivity…

First you would check the ‘Sharing’ section in ‘System Preferences’ only to find FTP is not there. So you might think, OSX does not have an FTP server?

Well, it would be a logical assumption because FTP is a bit outdated and WebDAV and SSH can do what FTP does but more secure. Unfortunately, WordPress only supports the FTP protocol.

Do not fear, OSX still carries the FTP servers AND on top of that, no extra configuration is needed, you just have to activate it.

How to activate FTP server on OSX?

To start the FTP server:

Shell commandsudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist

To quit it:
Shell commandsudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

It’s that simple :)

And remember; the FTP server will start automatically on each boot until the ‘quit’ command is used.

Final note; This post is the fifth post in a series to build the “ultimate” setup. See ‘The “Ultimate” Guide …’ for a complete list.

Author: Remon Pel

WebDeveloper though not WebDesigner

18 thoughts on “How to activate FTP server on OSX”

  1. That’s OK, but! Suppose one wants to have one account with rights on a specific directory, without creating a OSX account with its home, and so on, on Mountain Lion. I mean just a plain ftp/sftp user. I’m trying to add such a user in System Preferences/Users and Groups,of type “sharing only” but I don’t see the created user in the panel. Thus I cannot change its home directory to where I want.
    Could you, or someone else, post a way to accomplish this?
    Thanks Elio

    1. Well, step one would be; create a sharing-only user
      Then Rightclick the user and choose Advanced Options
      Set shell to bash
      Set home directory to wherever you want
      This user can now access your system through FTP.
      Do keep in mind that this user has his own user ID so the directory and its contents must be writable. This user cannot overwrite files by other users, etc.
      After googling for you a bit I found this* forum-thread suggesting the use of CrushFTP or Rumbus instead of the built in FTP service. I haven’t tested any of these.

      *) http://hintsforums.macworld.com/archive/index.php/t-832.html

  2. 2015 update: This still works like a charm! Finally the last part of my local developement stack is complete.

  3. Brilliant!  I do a lot of WordPress but in this case needed to update a test installation of OpenCart.  Every module, release etc. is build on the idea that you FTP your new item up to the server. The folder structure can be hairy so the idea of doing it manually was out of the question. Now I can install it locally with FTP. You’ve saved me hours. Thanks so much.

  4. Hi there :) Thank you so much for the tutorial although when I paste the command and press Enter it ask for password and when I try to type it or even paste it nothing happens…I believe I must be missing something ….? Many Thanks

    1. The sudo command (as any other command asking for a password on the terminal) will not echo when typing a password. So you will not see that you are typing or pasting, but you are :)

      Just type your password and hit enter.

  5. Hi, I’m a newbie to web development and am trying to set up WordPress. Where/how do I type or paste in the shell command? Thanks for humoring me.

    1. Shell commands are to be entered in the shell, which in OSX is available with the Terminal application. The shell in OSX is the Bourne Again Shell (a.k.a bash), in case you are wondering :)

  6. I switched to el Capitan and your code helped my at least to start ftp service again. In the past i used the pureFTPd Manager. With this litte app i could configure the ftp-Server. Unfortunaly it’s not for El Capitan, so i don’t have any idea how to configure the ftp-Server. What i wanna do is to add a new User with adminstrator rights, but only in the webroot directory which sits in my home directory. My programmer who’s working externaly, has to access the webroot, but only the webroot ;-). At the moment he can login, after i startet ftp, but i would love to change these settings. Now for testing it’s ok, because i set up everything new and don’t have the private files copied back to the new machine. I’m pretty new to all the terminal stuff and very unsure, what i’m doing, if i type some code in the terminal ;-)I hope my «german-english» is halfeway clear ;-)Regards from SwitzerlandPierre

    1. I think there is only one problem why the PureFTPd Manager no longer works. I cannot be certain because I haven’t used it in the past and not using it now, so I have no basis for comparison. I have checked and verified the FTP software in 10.11 (El Capitan) to be identical in earlier versions at least as far back as 10.7 (Lion). I have no way to verify on 10.6 (Snow Leopard) which is still supported by PureFTPd Manager.
      Now there are two possibilities that PureFTPd Manager is no longer working, and either one of these, or both, are applicable.
      1. OSX no longer uses PureFTPd since 10.7 – the FTP server announces itself with the name tnftp on 10.7 though 10.11. This may be a naming thing, perhaps the two are compatible – at least for user management – but perhaps it’s different software altogether.
      2. OSX 10.11’s System Integrity Protection is acting up. You can disable SIP and maybe solve this issue, but it will reduce the security of the OS.

  7. I used this command to start the FTP server on Yosemite and since then upgraded to El Capitan + OS X Server. Now that I have a “real” FTP server, I wanted to disable the automatic startup of FTP. I’m trying this command…sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plistbut am not able to unload FDP, get…/System/Library/LaunchDaemons/ftp.plist: Could not find specified servicebut it’s running and the plist is there!!??Open TCP Port: 21     ftpHow to stop this from starting at boot? 

    1. My instructions are for OS X only, not for OS X + OS X Server. To disable the FTP service, use the Server app. Unfortunately, I do not have a mac running the Server app so I have no idea where to look.

Leave a Reply

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