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.95/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...

10 Responses

  1. devis says:

    Hello Aaron, I get confused, I can’t find this file on my system.


    would you like to help me. thanks dude

  2. QuocPham says:

    Hi Aaron,

    After following the instructions performance, error:

    530 Login or password incorrect!
    • Aaron Kili says:


      Make sure your username or password is correct when trying to login.

      • mike says:

        Hi Aaron,

        Thanks for this article,

        I have the same error as QuocPham, 530 login or password incorrect, I made sure that username and password were correct, but still i have the same error.

        please advise

        • Aaron Kili says:


          If you have FileZilla installed, it could be the one causing the problem: listening to all connections on port 21. Try to stop it, then try accessing the FTP server once more.

  3. Alistair says:

    After doing the SElinux part, I get this restarting vsftp

    Jul 23 22:52:04 centos systemd[1]: Unit vsftpd.service entered failed state.
    Jul 23 22:52:04 centos systemd[1]: vsftpd.service failed.
    Jul 23 22:52:04 centos polkitd[688]: Unregistered Authentication Agent for unix-process:12504:94070 (system bus name :1.69, object path /org/freedesktop/PolicyK

    • Aaron Kili says:


      Try to run the command:
      #systemctl status vsftpd
      to view the vsftpd service status, it can actually indicate what is wrong.
      Alternatively, look through the system journal for any issues related to vsftpd and give us feedback.
      #journalctl -u vsftpd

  4. hemant singh says:

    Hey Aaron, thanks a lot for helping out newbie like me. But i have tried that you mention above, i have got

    error:500 OOPS: cannot change directory:/home/hs
    Login failed.
    421 Service not available, remote server has closed connection

    every time i want to connect to ftp server and tried everything from selinux enforcing mode to disable,permissive nothing works.Hope you can help. Thanks

    • Aaron Kili says:


      Sorry for the late reply, i was trying to figure out possible cause of the problem. Ensure that you run the semanage command to set SELinux rule to allow FTP to read/write user’s home directory(remember this is after you restrict FTP users to their Home directories explained in step 6):
      # semanage boolean -m ftpd_full_access –on

      Then restart the ftpd service:
      #systemctl restart vsftpd

      Alternatively, try to perform the whole setup again, carefully following the steps in the guide. However, thanks for appreciating our work.

Got something to say? Join the discussion.

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