Hello everyone,

Steps to install vsftpd and jail users to their home directories:

Step-1) To install vsftpd, on the terminal type:
sudo apt-get -y install vsftpd

Step-2) To edit vsftpd configuration file, on the terminal type:
sudo [nano/vi/emacs] /etc/vsftpd.conf

Step-3) To jail users to their respective home directories, search the file for text “chroot_local_user” and remove the ‘#’ pound sign at the begining of the line and change it’s value to ‘YES’. Save and exit.

Step-4) Restart vsftpd service:
sudo service vsftpd restart

Congratulations! you have successfully jailed users to their respective home directories.

Step-5) To test, on the terminal windows type:
ftp localhost
        (when prompted, enter local computer login credentials)
        pwd
        ls -lh
        ls -lh ../../.. OR whatever you want to check.

 

I sincerely hope you liked it. Please leave your valuable comments and suggestions.

Install vsftpd & restrict users to their home directories (Ubuntu)
Tagged on:                     

Leave a Reply

Your email address will not be published.