It you want a simple ftp server, you can use the great vsftpd.
Now, in my case I wanted to add an additional security feature, which is, to allow users only to access to their home folder and have write permissions to it. This was required for setting up an ftp connection with a webcam uploading images every x amount of time.
First, install vsftpd, but instead of installing the vsftpd version in the Ubuntu 12.04 package, you will need version 3, and this is a bit tricky.
I followed the instructions in this great post: http://blog.thefrontiergroup.com.au/2012/10/making-vsftpd-with-chrooted-users-work-again/. But you need to add a line to avoid this error: sudo: add-apt-repository: command not found.
sudo apt-get install python-software-properties (following this post: http://rbgeek.wordpress.com/2012/11/18/sudo-add-apt-repository-command-not-found-on-ubuntu-12-04/)
And then the rest:
sudo add-apt-repository ppa:thefrontiergroup/vsftpd
sudo apt-get update
sudo apt-get install vsftpd
So now you will have version 3 of vsftpd installed. And this version allows this configuration line that you have to add:
And also uncomment these lines:
Without version 3, you would be receiving this error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot ()
OK. Now let’s create the webcam user. I followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-12-04-and-centos-6
And then modified the home folder of the webcam user:
sudo usermod -d /desired/upload/folder/path/ webcam
Remember to reload the vsftpd server:
sudo restart vsftpd
And that’s it! write a comment if we can help you further