Setting Up FTP Server on Debian

Hi guys!

I had a task and that was to establish ftp server on a server ran on Debian Lenny OS. I just want to share my experience, maybe one of you meet the same task, so you don’t need to worry anymore. Ok, this is what I did :

  1. Install vsftpd package by running apt-get install vsftpd, if you’re not the root run it like this sudo apt-get install vsftpd.
  2. If you want to make your ftp open for public access, then you’ve done it! Just connect the server via ftp tools, fill in your host name, then fill the username field with ‘anonymous’ or ‘ftp’ and leave the password field blank, then connect. But, if you want to restrict the access with a certain account then continue the instruction.

  3. Make a new account, let’s say ‘ftp-user’. Run this command to create a new user adduser ftp-user. (again, if you’re not root user you have to put sudo in front of the command).
  4. Well done, now let’s modify the vsftp configuration file a bit, it’s located at /etc/vsftpd.conf. Open it and find this code
  5. anonymous_enable=YES and change it to anonymous_enable=NO. This code will deactivate ‘ftp’ and ‘anonymous’ account, so you won’t be able to access the server with those two accounts anymore.

    next, uncomment this code

    local_enable=YES. This option will allow local user to connect to ftp server.

    next step, uncomment this code

    write_enable=YES. This option will allow connected local user to upload files to the server via ftp.

  6. You almost there. But in my case, I add extra security to my ftp server by uncomment this option chroot_local_user=YES. This option will limited the user access only in their home directory.
  7. The last step is restarting the vsftpd by running /etc/init.d/vsftpd restart

Voila! You just finished establishing an ftp server on your Debian server. Well, this is only a brief instruction and if you want to go detail, maybe I can share you next time.



4 thoughts on “Setting Up FTP Server on Debian

  1. I’ve looked a few times for a “simple” FTP setup so I can just transfer files internally on my own network. Finally, I’ve found a good guide. Many thanks,.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s