How to install VSFTPd on Ubuntu & Jail users to there home directory.
How to setup a fast, secure FTP server so that users are able to login but can only view and browse there ‘home’ directory. /home/{username}.To install VSFTPd you need to issue this command in the ssh terminal… ( using root account).
apt-get install vsftpd
This will download VSFTPd and install it, next edit the configuration file to jail users to their home directories using the following command :-
vi /etc/vsftpd.conf
Look at the configuration file and find this line ‘chroot_local_user=‘
you should set the value to ‘yes‘ , so the new line should look as follows:-
chroot_local_user=YES
Then you should also make some minor adjustments to the system to enable users to upload and turn anonymous ftp off to stop the general public from accessing your server, The options below are not required but I personally like it set up this way.You can either add the following lines or simply uncomment them by deleteing the ‘#’ at the beginning of the line.
local_enable=YES
This will allow the local machine/server to connect.
write_enable=YES
This will enable users to upload, ammend and delete files.
You will now need to restart the VSFTPd daemon, to do this issue the following command:-
/etc/init.d/vsftpd restart