Setup FTP Server step by step in CentOS 6.5

  • Pingback: Install Red Hat Enterprise Linux 6.0 – Step by Step Tutorial With Screen Shots | Ostechnix()

  • Pingback: Setup Local YUM Server in CentOS 6.x / RHEL 6.x / Scientific Linux 6.x | Ostechnix()

  • Pingback: Setup DNS Server step by step in CentOS 6.3 / RHEL 6.3 / Scientific Linux 6.3 | Ostechnix()

  • thanks, very brief tutorial. Really helpful

    • SK

      Thanks for the feedback Auliasabri.

  • Great tutorial, but you forgot to tell us to turn the firewall back on at the end 🙂 (Or add the FTP ports to it)

    • Can anyone just show how to add the FTP ports to the firewall and turn it on.?

      • SK

        Edit iptables file,

        # vi /etc/sysconfig/iptables

        Add the following line:

        -A INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT

        Restart iptables.

        # service iptables restart


  • Moulay

    Thanks you.
    i would like to know to to specify the public Upload and Download folder for authonticated users.

  • Gaurav

    Thank you… very helpful tutorial… Can i also change the port instead of default 21 or 22???

    • SK

      Hi Gaurav!

      $ vi vsftpd.conf

      Find the following lines


      Change the port number whatever you want and restart the vsftpd service.

      Hope it helps.

  • Ziko

    Thank You very much! Its work. But I’ve one question: When I edit file.txt then automatiacally created file.txt~ and this file shown only from web browser. This is problem or not? If problem how can I fix it?

    • SK

      Hi Ziko I think it isn’t issue anymore. Anyhow i didn’t faced like this problem before. If i find a solution, i will let you know.

      • Ziko


  • Wook

    How can I have the banner displayed also for users coming in using a browser ? My Security Polilcy requires it, but seems that banner is only displayed when accessing FTP via CLI . Using banner only username/password is required, but then no banner is shown.. : /

  • Wook

    Sorry I meant: “Using browser only username/password is required, but then no banner is shown.. : /”

  • Pingback: SELinux blocks VSFTPD uploads CentOS 6.4()

  • Nigam Raval

    thanks very brief tutorial

    • SK

      Thanks Nigam.

  • Rick Ovens

    Excellent! Clear, concise and accurate. Thank you

  • pawan

    How to restrict some IP’s not use my ftp servers.

  • DUDE, why did you leave the firewall disabled? That is a terrible idea.

  • david

    THANK YOU SO MUCH! If I could, I would kiss you. This is by far one of the BEST tutorials I’ve come across in a very long time. I have spent the last 3 hour trying to setup vsftpd and log in remotely, but nearly all the tutorials on the web are ill illustrated and very confusing. Your tut got me up and running in 4 minutes.

    One more thing, If I want to ftp over ssh, that is sftp to be more secure, how would I go about?

    Thank you once again

    • Sathis STR

      Really nice tutorial …

  • Tony

    Very good tutorial 🙂
    BTW how to change $HOME directory for particular user who do ftp? can you help me for that?

  • rahul jangam

    hey friends when I am doing ftp via browser it wont ask me for password.
    i did all these settting its its really nice brief explanation good work.

  • Gerald

    this is a great tutorial, but how do you configure the firewall to allow ftp ? so that you don’t have to leave the firewall turned off ?

  • Mohamed

    the default folder where the users are connected is /var/ftp/pub.

  • Arun

    Thanks Brother…Really Helpful…!!!

  • ajit ranjan deb

    thanks for clear concept

  • Farhaaz

    It is very simple and nice explanatio….Thank you very much!

  • Harsha

    very good tutorial. Thanks a lot

  • Mohammad Rizwan

    bundle of Thanks

  • siraj

    Nice one bro..worth reading it..simple and clear..

  • kookin

    Awesome, thanks so much!!

  • Many thanks for such a nice doc.

  • Prabath

    Its a very nice tutorial and really helpful. Thank you very much.

  • Serge

    Very nice tutorial, the only problem i have is that i can connect to my ftp server with Filezilla or any other GUI ftp, command line is working fine

  • Serge

    Sorry this what i meant
    Very nice tutorial, the only problem i have is that i can’t connect to my ftp server with Filezilla or any other GUI ftp, command line is working fine.
    Error: The data connection could not be established: ECONNREFUSED – Connection refused by server
    [L] UTF-8 encoding is recommended (Sites -> Site Manager -> Options -> Server Encoding)
    [L] PWD
    [L] 257 “/home/serge”
    [L] PASV
    [L] 227 Entering Passive Mode (192,168,1,10,41,74).
    [L] Opening data connection IP: PORT: 10570
    [L] Connection refused
    [L] Socket is closed

    Any help ???

  • Thanks for Tutorial