
sudo ufw reloadįinally, grab your FTP client such as FileZilla, and fill in the details as follows: Then reload the firewall for the changes to apply. sudo ufw allow 20/tcp sudo ufw allow 21/tcp In case you have a firewall enabled, allow ports 20 and 21. sudo systemctl status vsftpd Step 5: Access the vsftpd server Just to ensure that everything is fine, you can verify its running status. Rsa_private_key_file=/etc/ssl/private/vsftpd.pemįor the changes to come into effect, restart the server. Rsa_cert_file=/etc/ssl/private/vsftpd.pem In summary, your configuration file should contain these lines: listen=NO rsa_cert_file=/etc/ssl/private/vsftpd.pem rsa_private_key_file=/etc/ssl/private/vsftpd.pem ssl_enable=YES Head back to the default configuration file again, and paste these lines to specify the path of the generated SSL certificates and enable SSL. sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem We are going to generate a self-signed SSL certificate to encrypt the server. To provide a secure FTP connection to the server, we need to encrypt the server using an SSL certificate. userlist_enable=YES userlist_file=/etc/erlist userlist_deny=NO write_enable=YES chroot_local_user=YES allow_writeable_chroot=YESĪdditionally, you can limit the local users who can access and upload files by specifying only the users contained in the erlist file. Next, you need to allow the local user to upload files and gain access to their home directory as well as make changes to the files as indicated. Therefore, we will disable login by the anonymous user and only grant access to the local user. But this is not what we want due to security purposes. By default, anonymous users are granted access. For additional help or useful information, we recommend you check the official Vsftpd website.There are a couple of settings that you need to ensure are set.

Thanks for using this tutorial for installing the latest version of the FTP Server on Debian 11 Bullseye. In our case, we are using FileZilla as an FTP client.Ĭongratulations! You have successfully installed FTP Server.
Install ftp debian install#
To test the FTP connection, you will need to install an FTP client in the same or a separate system from where you want to access the FTP server. Now we have to configure the firewall so that the FTP traffic can pass through the firewall: sudo ufw allow 21/tcp Save and exit the file, then restart Vsftpd using the following command below: sudo systemctl restart vsftpd Rsa_private_key_file=/etc/cert/vsftpd.pem Next, edit nf file and make some changes: nano /etc/nfĪdd the following line: rsa_cert_file=/etc/cert/vsftpd.pem Sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/cert/vsftpd.pem -out /etc/cert/vsftpd.pem To provide a secure FTP connection to the server, we need to encrypt the server using an SSL certificate: sudo mkdir /etc/cert Restart the server for the changes to take effect: sudo systemctl restart vsftpd Now we must proceed and edit the main configuration file /etc/nf: nano /etc/nf

Sudo chown meilana:meilana /home/meilana/ftp_directory/ftp_data Sudo mkdir -p /home/meilana/ftp_directory/ftp_data Then, create a directory where files can be uploaded and give ownership to meilana user by executing command: Sudo chmod a-w /home/meilana/ftp_directory Sudo chown nobody:nogroup /home/meilana/ftp_directory Next, we need to add meilana user in vsftpd user list: echo "meilana" | sudo tee -a /etc/erlistĪfter that, create an FTP directory: sudo mkdir -p /home/meilana/ftp_directory

Local users specified in this file are granted permission to access the FTP server: sudo adduser meilana Now create the FTP user to the erlist file. Once the installation is complete, now enable Vsftpd (to start automatically upon system boot), start the webserver, and verify the status using the commands below: sudo systemctl start vsftpd Now run the following command below to install Vsftpd to your Debian system: sudo apt install vsftpd Installing FTP Server on Debian 11.īy default, Vsftpd is available on Debian 11 base repository.
Install ftp debian update#
Before we install any software, it’s important to make sure your system is up to date by running the following apt commands in the terminal: sudo apt update We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

