To configure vsftpd (Very Secure FTP Daemon), follow these steps:
Install vsftpd:
sudo apt update sudo apt install vsftpdBackup the Default Configuration:
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bakEdit the Configuration File: Open the configuration file in a text editor:
sudo nano /etc/vsftpd.confHere are some common settings you might want to adjust:
anonymous_enable=NO # Disable anonymous login local_enable=YES # Enable local users to log in write_enable=YES # Allow users to upload files chroot_local_user=YES # Restrict users to their home directories allow_writeable_chroot=YES # Allow writing in chrooted directoriesSet Up User Accounts: Create a user account for FTP access:
sudo adduser ftpuserSet Permissions: Ensure the user has the correct permissions for their home directory:
sudo chown ftpuser:ftpuser /home/ftpuserRestart vsftpd: After making changes, restart the vsftpd service:
sudo systemctl restart vsftpdAllow FTP Through the Firewall (if applicable):
sudo ufw allow 20/tcp sudo ufw allow 21/tcpTest the FTP Server: Use an FTP client or command line to connect:
ftp localhost
This basic setup should get your vsftpd server running. For more advanced configurations, refer to the vsftpd documentation or specific use cases. If you have any specific requirements or questions, feel free to ask!
