How to Install, Configure and Secure FTP Server in CentOS 7 – [Comprehensive Guide]

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

45 Responses

  1. Mac says:

    Hi Ravi,

    I have followed the guide (trying to learn how to manage control etc) but I got stuck as soon as I got to step 4. I created a user account and it is showing, but whenever I try and run:

    $ sudo echo "nick" | tee -a /etc/vsftpd.userlist

    I get the following:

    tee: /etc/vsftpd.userlist: Permission denied

    I am at a loss. I have searched on google and simply cannot fathom what is going wrong.

    Any thoughts?

    • Aaron Kili says:


      Use this command instead:

      $ echo "nick" | sudo tee -a /etc/vsftpd.userlist

      Hope this works!

      • Mac says:

        Hey Aaron,

        Many thanks for that. I will try it with the next user I set up. I have been off ill so the learning stopped for a while.

        One other thing, I forgot the password to the user I set up, so thought its simple to fix. Simply:

        $ sudo passwd USERNAME

        But no matter how much I changed it, it wouldn’t let me log into the ftp server where it previously it did. I restarted it and all sorts.

        Any idea ?

  2. sri says:

    I have given ftp home folder at /opt, users unable to delete files in they ftp folder.

  3. orang timur says:

    I was follow this tutorial step by step until next tutorial with securing ftp server with tls/ssl. on my local server is working like charm but. when i try to remote with ftp client tool like filezilla its error with command unrouted and illegal port.

    how to fix it?

    my ftp server behind the NAT of mikrotik router. thanks in advanced

  4. M Sai Prasad says:

    Hi Ravi

    Thank for the nice writeup.

    Does it make more sense to use firewall-cmds without “–zone=pubilc” so that it can be added to active and default zones ?

    Sai Prasad

    • Ravi Saive says:


      Say thanks to our author Aaron, who create this easy to follow tutorial for users like you..

      Yes, its not mandatory to add “–zone=pubilc” everytime with firewalld commands..

  5. tommi says:
    # semanage boolean -m ftpd_full_access --on 

    is not working out the box, it required seemange fcontext and other stuff including restorecon.

  6. Linksys Suppport says:

    I am using FTP for sharing files between my Computer and Oppo device I was securing my FTP server by using the following thing that’s is Disable Standard FTP, strong encryption, using larger password, a correct antivirus installed on the computer, File & folder encryption etc.

    This helps me you can also try this if you are using FTP between smartphone and Computer. If anyone has a Router’s issue and facing a problem with the Router’s network follow Linksys Support for a solution because it helps me to fix my server and IP address issue when I was using FTP through my Router’s network help.

  7. Dan Kaufman says:

    Worked like a charm! Thanks, Ravi!

  8. Belo says:

    I get an error at step 1(2) – systemct1: command not found. Any thoughts?

  9. helwie ahmad says:

    Please update your tutorial, its not compatible with latest version.

  10. Thiago says:

    Hi Aaron. Thanks for the tips. It’s very helpful, but I have a problem in the Step 5. I did it like you wrote but when I connect in the FTP I continue to go in the folder “/home/$myuser”.

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.