Setting up VSFTPD [ Very Secure FTP Daemon ] on Ubuntu based VPS and Machine.
As FTP [ File Transfer Protocol ] used to transfer files is inherently insecure and vulnerable to a number of exploits . So, its preferable to use VSFTPD [ Very Secure FTP Daemon ] as alternative to FTP. It's more secure and have few enhanced features as comparedto FTP.
Setting UP VSFTPD on Ubuntu [ 12.0 ]
- Open up terminal of machine or Vps and run the following command as root to install vsftpd.
sudo apt-get install vsftpd
- vsftpd is already configured with default options. So, you can use it as it is and can play with settings to make is more secure.
Making vsftpd more Secure
- Open the vsftpd config file and make the following changes.
sudo nano /etc/vsftpd.conf
- Or you can use
sudo gedit /etc/vsftpd.conf
- First, set anonymous mode off to restrict unidentified users from accessing the ftp server.
anonymous_enable=NO
- Now uncomment local enable and and set it to Yes.
local_enable=YES
write_enable=YES
chroot_local_user=YES
- Now save and exit from the vsftpd.conf file.
- Create a separate directory to store ftp files and change the ownership of directory to root.
mkdir /home/username/files [ To create directory ]
chown root:root /home/username [ To change ownership ]
- Now Your VSFTPD server is securely setup. Now, restart vsftpd to activate the changes made.
sudo service vsftpd restart
Accessing ftp Server
- Now, as we have installed and configured our vsftpd server. We , can use it to share files
- Open your browser and type the address [ ftp://IP of VPS ] eg : [ ftp://192.168.0.1 ]
- Or to access locally , you can use [ ftp 192.168.0.1 ] to access ftp service.