As you can see, since the update on Mac OS X 10.7 Lion, the system has lost the ability to enable an FTP server for sharing files and folders. It’s unclear why Apple removed the graphical interface for enabling FTP sharing, but you can still start a local FTP (or SFTP) server on macOS using the command line.

If you use the command line, you probably noticed that the latest versions of macOS do not have FTP file transfer protocol.

By default, FTP is not installed in the latest versions of the system, but this does not mean that you cannot install the protocol yourself. Modern versions of macOS use SFTP instead of FTP. SFTP has more secure encryption.

However, some users still prefer FTP. If you don’t need FTP, then there’s no reason to install it.

How to Install FTP in macOS

If you still haven’t installed Homebrew on a Mac, you need to do this before proceeding with the instructions below.

We will do this by installing inetutils. And this is done through Homebrew. If you haven’t Homebrew in your system, you can take script for Homebrew installing here.

Installation Using inetutils

The inetutils file contains: FTP, FTP server, telnet and telnet server, as well as rsh, rlogin, tfp servers and clients, etc. If you need FTP protocol, it will not hurt to install the entire set.

To do this, use the following command:

brew install online

When Homebrew finishes installing inetutils, you can run the FTP command as usual. For example, you can connect to the gnu.org server to check that everything worked out.

ftp anonymous@ftp.gnu.org

One of the advantages of this method is that you also get other useful tools in the kit, and you will not need to install them manually.

How to Start FTP and SFTP Server in macOS

Naturally, it is possible to download a separate server and many do, but why, if the mac out of the box already has a built-in ftp / sptp server, which is enough for most tasks. Simply, the built-in server is disabled by default and we just need to enable it. This is what we will do.

Start FTP server in macOS

First, start the Terminal (/Applications/Utilities/Terminal.app) and run the following command:

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

Check if the server is working with the ftp localhost command. If you see something similar in the terminal window:

So everything turned out and the server works. To connect to the server, use your account or create a new one, especially for ftp connections (which will be more correct from a security point of view). To access files on the server, use the “connect to server” command in the Finder or using any ftp client.

Start SFTP server in macOS

As you know, the FTP server transmits data in unencrypted form and, as a result, for security reasons, it is not very reliable.

To exchange information securely, you need to use an SFTP server, for this:

  • If, for security reasons, you still need to encrypt the transmitted data, then enter the “System Preferences” -> “Sharing”;
  • Check the box next to “Remote Login”;
  • In the “Allow access” block, it is advisable to select the “Only these users” option and Specify your users.

You can also test the operation of this server using with command:

sftp localhost 

ATTENTION!!!

FTP and SFTP servers may conflict with each other and it is not recommended to keep them enabled at the same time.

Server Shutdown

The built-in SFTP server is disabled by unchecking the Remote login option in the system settings.

You can disable the FTP server in the terminal using the command:

sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

Conclusion

If this is the first login to the server, then the client will offer to remember the host to which the connection is made. You can confirm this action by typing the word “yes” in the console and pressing the “Enter” key. Otherwise, type “no” and press “Enter”.

Next, you need to enter a password, if all the data has been entered correctly, the client will successfully connect to the server.

It’s the best time to ask questions and give us your feedback in comments.

Author

Hi there! My Name is Vincent Lago! My goal is to share insightful reviews, guides, and manuals for people looking to know more about current solutions for Apple hardware and OS. I have years of technological background knowledge including owning a custom iMacs & PCs which was using for different types of business. And now, I want to share my experience with you.

10 Comments

  1. would you please share the content of your http://ftp.plist? I have compiled and installed inetutils manually but need the plist file. I dont want to use homebrew. Thank you

  2. Jason Vaughan Reply

    This doesn’t start:

    jason$ sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
    Password:
    /System/Library/LaunchDaemons/ftp.plist: No such file or directory
    Mac-mini:~ jason$

  3. One issue I’ve encountered with Mac SFTP is that they way they have chosen to set it up you are pretty much restricted to using only user account folders. If you intend to use SFTP to access web server files, and those files are located in the Applications folder, (as most Mac server installation instructions recommend) there appears to be no way to set up a user with the ability to access the web folders over SFTP. Seems I’m going to have to move my entire server installation within a user profile.

    Or am I missing something?

    • Vincent Reply

      Hi, Chris! Thank you for your comment. Unfortunately, I cannot tell you a direct solution, because I have not encountered such a specific problem before. Try looking at “stackoverflow” solutions or asking a question.

  4. Wondering if you have any thoughts….

    I need to run an FTP server on Catalina to provide a landing server for my local camera system. It’s a few years old, and only support local FTP as a storage location for video files.

    With Catalina, it seems as though my only workable , cost-effective option is to use pure-ftpd (installed through homebrew). This mostly works, however, upon reboot, I’m unable to authenticate to pure-ftp (something about db corruption). BUT….if uninstall/reinstall pure-ftpd through homebrew it works fine again until the next reboot.

    Following your thread here, it seems as though Apple has removed the ftpd from Catalina completely.

    Any ideas? Not wanting to shell out $200-$500 for a commercial FTP solution. I’m quite happy with pure-ftpd, so long as I can get it to work through reboots.

    thanks!
    J

    • Vincent Reply

      Hey, Jay! Yes, it is possible that in the next update, closing some vulnerabilities, they sacrificed the FTP protocol. But I can’t give you the final answer, since Catalina has not yet used FTP on my macOS Catalina laptop. At High Sierra, everything worked without problems. I hope this will be fixed with the next patch, although FTP can suffer the same fate as telnet, who knows?

  5. Hi Vincent,
    Following the guide for “How to Run FTP or SFTP Server in macOS”, when I ran brew install online I got a bunch of errors:

    ritas-macbook-3:~ Louise$ brew install online
    Updating Homebrew…
    ==> Auto-updated Homebrew!
    Updated 1 tap (homebrew/core).
    ==> Updated Formulae
    docker-compose jenkins php@7.3
    duplicity php@7.2 vault-cli

    Error: No available formula with the name “online”
    ==> Searching for a previously deleted formula (in the last month)…
    Warning: homebrew/core is shallow clone. To get complete history run:
    git -C “$(brew –repo homebrew/core)” fetch –unshallow

    Error: No previously deleted formula found.
    ==> Searching for similarly named formulae…
    Error: No similarly named formulae found.
    ==> Searching taps…
    ==> Searching taps on GitHub…
    Error: No formulae found in taps.

    Is thee another formula I could use to get the inetutils file?

    I am running OS 10.9.5 and HOMEBREW_VERSION: 2.2.4

    Thanks

    • Vincent Reply

      Hello, Don! You probably have broken some dependencies in Homebrew. Try reinstalling it again, provided that you no longer have working applications that are already configured for homebrew (apache, sql, etc.). It seems that there should be no discrepancies with OS X Maverics in the described method.

Reply To Vincent Cancel Reply