Set-up ftp server in Ubuntu 12.04 with vsftpd, allow uploads to home folder

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: But you need to add a line to avoid this error: sudo: add-apt-repository: command not found.

This line:

sudo apt-get install python-software-properties (following this post:

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:

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

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s