How do I run FTP server in Mac OS X?

I need to test FTP client codes, so I need to find an FTP server for testing my codes. After searching for a while I find out that OS X already equipped FTP server. I am currently using OS X El Capitan 10.11.*.

Let’s now test the FTP server on Mac OS X with the following steps:

  • Launch the
  • Type the following command to start the FTP server.
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
  • Connect to the FTP server by running ftp localhost command.
  • We’ll be asked to enter the username and password.
$ ftp localhost
Trying ::1...
Connected to localhost.
220 ::1 FTP server (tnftpd 20100324+GSSAPI) ready.
Name (localhost:wsaryada): wsaryada
331 User wsaryada accepted, provide password.
230 User wsaryada logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
  • If we see the messages above and the ftp> prompt means that the FTP server works and ready to accept our command.
  • We can also try to access the FTP server using a browser. In the URL box type ftp://localhost to connect. We need to supply username and password to login.
  • To exit or close the connection to FTP server we can run the exit command.
  • Finally, to shutdown the FTP server we run:
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

After the FTP server ready, I can now continue to create some test program to access the FTP server. There are already some examples you can find in the Apache Commons Net category that use the FTPClient library to access FTP server.

How do I install Gradle in Mac OS X?


In this post we will learn how to install Gradle in OS X. The following steps will guide our installation process to make Gradle available in our OS X machine. But before we start let’s take a look at the definition from wikipedia about Gradle.

Gradle is an open source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven of declaring the project configuration.

From: Wikipedia

Gradle Installation Steps:

1. Download Gradle

To download visit Gradle Releases Page. Download the complete distribution which includes binaries, sources and offline documentation. For example you can download the latest release of Gradle, as of this update the version is

2. Upacking Gradle and Configure Environment Variables

  • Open
  • Create a new directory sudo mkdir /usr/local/gradle.
  • Extract the downloaded Gradle distribution archive by executing sudo unzip -d /usr/local/gradle.
  • Edit .bash_profile in your home directory to add GRADLE_HOME variable with the following line export GRADLE_HOME=/usr/local/gradle/gradle-4.0.2
  • Also update the PATH variable to include $GRADLE_HOME/bin. If you don’t already have the PATH variable add the following line export PATH=$GRADLE_HOME/bin:$PATH
  • Run source ~/.bash_profile to executes the update version of .bash_profile. Or you can open a new to make this changes active.

3. Running the Installation

To test Gradle installation open the and execute gradle -v command. If your installation was correct you will see something like the following output:

$ gradle -v

Gradle 4.0.2

Build time:   2017-07-26 15:04:56 UTC
Revision:     108c593aa7b43852f39045337ee84ee1d87c87fd

Groovy:       2.4.11
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_121 (Oracle Corporation 25.121-b13)
OS:           Mac OS X 10.12.6 x86_64