An Ultimate Guide to Setting Up FTP Server to Allow Anonymous Logins

In a day where massive remote storage is rather common, it may be strange to talk about sharing files using FTP (File Transfer Protocol).

However, it is still used for file exchange where security does not represent an important consideration and for public downloads of documents, for example.

It’s for that reason that learning how to configure a FTP server and enable anonymous downloads (not requiring authentication) is still a relevant topic.

In this article we will explain how to set up a FTP server to allow connections on passive mode where the client initiates both channels of communication to the server (one for commands and the other for the actual transmission of files, also known as the control and data channels, respectively).

You can read more about passive and active modes (which we will not cover here) in Active FTP vs. Passive FTP, a Definitive Explanation.

That said, let’s begin!

Setting up a FTP Server in Linux

To set up FTP in our server we will install the following packages:

# yum install vsftpd ftp         [CentOS]
# aptitude install vsftpd ftp    [Ubuntu]
# zypper install vsftpd ftp      [openSUSE]

The vsftpd package is an implementation of a FTP server. The name of the package stands for Very Secure FTP Daemon. On the other hand, ftp is the client program that will be used to access the server.

Keep in mind that during the exam, you will be given only one VPS where you will need to install both client and server, so that is precisely the same approach that we will follow in this article.

In CentOS and openSUSE, you will be required to start and enable the vsftpd service:

# systemctl start vsftpd && systemctl enable vsftpd

In Ubuntu, vsftpd should be started and set to start on subsequent boots automatically after the installation. If not, you can start it manually with:

$ sudo service vsftpd start

Once vsftpd is installed and running, we can proceed to configure our FTP server.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Gabriel Cánepa
Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

14 Comments

Leave a Reply
  1. Hi, is FTP still part of the LFCS in 2020? Can’t see it in the Service Configuration exam topics.

    Anyway, great article.

    Reply
  2. Hello, Just concerned a little if configuring NFS, FTP and DNS servers are going to be a part of the exam. Please confirm so that I would start re-doing or practicing the methods thoroughly.

    Reply
  3. Hi Gabriel,

    first of all thank you for such a comprehensive manuals – they are just great.

    I think I found a little typo:
    pasv_max_port=15000
    pasv_min_port=15500

    It should be in reversed order – max 15500 and min 15000.

    Reply
    • @Jalal,
      The pound sign, as used here, is a write-up convention to indicate that’s a command that should be typed in the terminal.
      If you mean this specific command does not need to be run as root, you’re right.
      @Ravi
      Please confirm.

      Reply
      • @Jalal,

        Like @Gabriel, said the signs are used for command indication only and you’re absolutely right, the pound sign is not necessary to have when using with ftp commands.

        Reply
      • What I understand from Jalal’s comment, is that the get command is written inside the ftp console, so the pound sign cannot be there. Instead it should be “ftp> get vsftpd.conf.pdf”.

        Correct me if I’m mistaken.

        Reply
        • I believe you’re right. Having the pound sign there may lead to confusion, as it is not actually a Linux command but a FTP one. Perhaps a clarification at the proper place in this article should do the trick.

          Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.