Install ProFTPd on Debian
Many people express interest in running FTP on their VPS and while we do not encourage this due to the security, configuration and other implications instead preferring the SFTP method below is a guide to installing and setting up a very basic FTP configuration.
Following these steps on a CLEAN (eg. no prior configuration changes) Debian VPS will allow you to setup and install an FTP server.
- Connect to your VPS via SSH
apt-get install proftpd
echo "/bin/false" >> /etc/shells
useradd -d /home -g nogroup -p yourftppassword -s /bin/false yourftpuser
mv /usr/local/apache2/htdocs/* /home/website
usermod -a -G nogroup www-data
chown www-data:nogroup -R /home
- Press the INSERT key and modify the following lines in your httpd.conf...
- Replace User daemon with User www-data
- Replace Group daemon with Group nogroup
- Replace DocumentRoot "/usr/local/apache2/htdocs/" with DocumentRoot "/home/website"
- Replace <Directory "/usr/local/apache2/htdocs/"> with <Directory "/home/website/">
- Press the ESCAPE key and run:
You should now be able to connect to your VPS via FTP to manage files using normal FTP services, you can test this by attempting to do so via FTP client of your choice using your VPS IP number and the FTP user and FTP password you setup in step 4.
- Elements in blue are to be chosen by you, this will be your FTP username and FTP password, you should ensure they are both very secure choices as this FTP user will have full access to your /home directories not just your website files.
- If you will be adding more users in the future, you can simply run:
useradd -d /home/website/folder -g nogroup -p anotherftppassword -s /bin/false yournewftpuser
This would limit the new FTP user to only /home/website/folder when accessing FTP and would be a new and unique account. Remember to restart the FTP afterward.