How to Install FTP on MacOS Mojave & High Sierra
Mac command line users may have noticed that FTP is missing from the latest versions of MacOS system software, but despite ftp not being included in newer versions of system software by default, you can still install ftp on Mac OS if you need to use an ftp client or run an ftpd server for whatever reason.
For some quick background, modern versions of Mac OS pulled ftp to instead emphasize SFTP usage. Likewise, telnet was removed in favor of ssh. These decisions were probably made to favor the more secure encrypted protocols of SFTP (and ssh), but nonetheless some users may still need to regularly use the older ftp transfer protocol, even if it’s not particularly secure. Accordingly, certain Mac users may need to install and run ftp as a client, or ftpd as a server, which is who this tutorial is geared for. If you don’t need ftp, there’s no reason to install it.
How to Install FTP on MacOS
If you have not already installed Homebrew on the Mac, you will need to do so before beginning with this particular approach.
You have two options, one is to install inetutils (which also includes some other useful packages), or you can install tnftp. Either is achievable through Homebrew:
Installing ftp in MacOS with inetutils
The inetutils package includes ftp, the ftp server, along with telnet and telnet server, and the server and clients of rsh, rlogin, tfp, and more. If you want ftp, you very well may want this full suite, in which case installing inetutils through Homebrew is as simple as issuing the following brew command:
brew install inetutils
Once Homebrew completes installing the inetutils package, you can run the regular ftp command as usual, for example you can connect to the gnu.org ftp server to verify that all is working as expected:
ftp anonymous@ftp.gnu.org
One of the obvious perks to installing ftp and ftpd server with inetutils is you get other helpful network utilities, so you won’t need to manually install telnet on the Mac if you need that, it will just come in the same package together.
Installing ftp through tnftp
To install only an ftp client, you can install tnftp on the Mac. With homebrew you can accomplish this with the following brew command:
brew install tnftp
Additionally, if you want the tnftpd server you can use the following command:
brew install tnftpd
Whether you want to install the full inetutils package, or tnftp alone, is entirely up to you and your specific needs and requirements.
FTP was removed in macOS High Sierra and macOS Mojave, but ftp and ftp server do remain in older versions of Mac OS and Mac OS X system software, even if the ftp server has to be manually activated with launchctl. In some older versions of Mac OS, you can even connect with ftp from the Finder however. Meanwhile, newer versions of Mac OS include native options to use SSH & SFTP server for remote logins
Alternatively, get ftp by compiling inetutils
Finally, another option is to compile inetutils from source if you prefer that approach, which you can get here from gnu.org. You’ll need the Mac OS command line tools installed, then unpack the tarball, run configure, make and make install:
tar xvzf inetutils-1.9.4.tar.gz
cd inetutils-1.9.4
./configure
make
sudo make install
And then you’re good to go with ftp, telnet, and the other network tools, all by compiling them from scratch.
If you have another solution to getting FTP and an FTP server on a Mac (and no, not SFTP which is different and already included), share with us in the comments below!
Hi,
I want to install and setup a FTP Server on my Mac so I ‘brew installed inetutils’ but I noticed it didn’t install ‘ftp server’. It only installed the following:
ftp
rcp
rexec
rlogin
rsh
telnet
How do I get ‘ftp server’?
Also, I’m unfamiliar with FTP setup so I was wondering how do you set it up? Like create a username, hostname with FTP server?
For folks having issue with setting up FTP server. Issue the following commands after install of inetutils to get server setup and test connectivity
cd /usr/local/Cellar/inetutils/1.9.4_2/libexec/
sudo ./gftpd -D
cd /usr/local/opt/inetutils/libexec/gnubin
./ftp localhost
Haha do not pay money or install extra software if all you need is ftp download. Simply use cURL which has not gone away.
Homebrew is free, so is ftp and sftp. Homebrew is a package manager, ftp is a client/server protocol to transfer files.
>> If you have another solution to getting FTP and an FTP server on a Mac…
Thank you guys for your advice not to use ftp as it is not secure… BUT – no offence! – please take into account that there ARE situations where exactly this option is required… :)
So, I need an ftp Server for my dlink IP cameras that are silly enough to still not supporting sftp and I’m silly enough to not being able to get their smb option working with macOS shares… ;)
Inetutils/gftpd: I’ve been running into the same auth issues as Fort (s.above) and still don’t get that working (I assume gftpd is incompatible with macOS’s Open Directory method and I wasn’t brave enough to manually patching /etc/passwd… ;D)
So, I gave up and finally came across an app simply called ‘FTP Server’ working very well for me on Mojave 10.14.3! – You’ll find it for some bucks at the Mac App Store…
I also installed this commercial FTP server (“FTP Server” in the app store) on Mojave, and it works fine. If you don’t have homebrew on your system, I’d say the $4.99 is a cheaper way to go.
None of this seems to work on Mojave 10.14.2.
I tried to run “brew install tnftpd” and got “You may need super-user privileges to run this program properly.”
So then I ran “sudo brew install tnftpd” and got “Running Homebrew as root is extremely dangerous and no longer supported.”
Next I ran “brew install tnftpd” and got “tnftpd 20100324 is already installed and up-to-date.”
Finally I ran “ftpd” and got “command not found.”
If you just need to squirt a file off from time to time with ftp, just copy the /usr/bin/ftp program from Mavericks, or perhaps later versions… it works just fine and you won’t clutter up your system with all this other stuff.
How can I run a FTP server after I installed inetutils?
I too would like to know this.
To start FTP server you must run FTPD which is the ftp daemon.
Assuming user has standard shell, command then is:
ftpd
Starts the server.
Then ftp to the IP, login with standard shell.
More info, general as per GNU (inetutils origin)
https://www.gnu.org/software/inetutils/manual/html_node/ftpd-invocation.html
first of all, just entering ftpd reports “command not found”,
so i had to:
cd /usr/local/Cellar/inetutils/1.9.4_1/libexec
./gftpd -D
then entering:
ftp localhost
anonymous
none
gives error: 550 Can’t set gid.
if i try my own user account, it says: 530 Login incorrect
do you have any better instructions to get this to work?
If you don’t have ftpd installed then ftpd will not run. But you should use sftp not ftp, ftp is not secure.
Here’s how you can fix “Command not found” errors
https://osxdaily.com/2018/05/24/command-not-found-mac-terminal-error-fix/
And here is how to fix permissions “operation not permitted” errors in macOS MOjAVE Terminal
https://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/
Hi Fort,
I’m running into exactly the same issue (on Mojave 10.14.3) – could you resolve it in the meantime?
Thx
Renato
/rantmode on I’m sorry but this is just sad. What’s next, no terminal? Either MacOS is Unix or it’s not. It isn’t about the fact that other GUI FTP apps do it better, it’s about expecting certain tools out of the box to be there. Coming next, no ability to even install FTP because it’s not 64bit and not the right “certified/aka part of the walled garden” app store version. /rantmode off
Hmmmm,
I dont understand the point of this article.
High Sierra is supporting FTP at least in read only mode.
After the described instalation it will be able also to write data on FTP server?
It is OK, if you do not understand the point of ftp then you don’t need ftp ;) I think the same thing about Adobe software products … ha ha! OK a bad joke, maybe.
Try running ‘ftp’ at the command line, without ftp installed it will not run. I think that unless you need ftp server, you can simply use the ftp clients like Transmit or Cyberduck, no reason for command line for most Mac users.
If you need to connect to ftp servers, I think an easier option for most people is to use a standard FTP app on the Mac. A lot of FTP apps for Mac exist, including:
– Cyberduck
– Transmit
– Filezilla
The command line ‘ftp’ client is useful too, but if you’re not a command line user it makes ftp connections more challenging than they need to be simply to connect to.
It’s also probably notable that installing ftp at the command line also installs the ftp server.
I personally use SFTP with regularity, but a lot of web hosts and other platforms are removing SFTP access too, favoring git and other version controlling tools.
I personally prefer forklift, I have been using it for years. I’m very satisfied with it but I was a little bit surprised when I saw the results of the performance test which the developers of forklift published recently. Now I’m even happier that I don’t have to use the ugly filezilla because it’s not just an eyesore but also super slow:) https://binarynights.com/blog/best-ftp-clients-compared-speed-test