Pure-FTPd is a free, open-source FTP server that supports multiple virtual users, quotas, IPv6, SSL/TLS encryption, and more. If you want to set up a reliable and secure FTP server on your Ubuntu 22.04 machine, Pure-FTPd is an excellent choice.
In this article, we will guide you through the process of installing and configuring Pure-FTPd server on Ubuntu 22.04.
Step 1: Update Ubuntu
Before installing Pure-FTPd, it's essential to ensure that your Ubuntu 22.04 machine is up-to-date. Open the terminal and run the following command:
sudo apt update && sudo apt upgrade
Step 2: Install Pure-FTPd
Once the update is complete, you can install Pure-FTPd using the following command:
sudo apt install pure-ftpd
Step 3: Create Virtual Users
Pure-FTPd uses virtual users to authenticate and authorize access to the FTP server. To create a virtual user, you need to use the 'pure-pw' command-line utility.
First, create a plain text file that contains the username and password for the virtual user. In this example, we'll create a virtual user named 'ftpuser' with the password 'pass123'.
echo "pass123" | sudo tee -a /etc/ftpuser.passwd
Next, create a new virtual user using the 'pure-pw' command:
sudo pure-pw useradd ftpuser -u ftpuser -d /home/ftpuser
The '-u' option sets the system user to 'ftpuser', while the '-d' option specifies the home directory for the virtual user.
Step 4: Configure Pure-FTPd
By default, Pure-FTPd uses a standalone server configuration. However, you can customize the configuration by modifying the '/etc/pure-ftpd/conf/' files.
Here are some common configuration options you may want to change:
- Enable TLS encryption: Uncomment the line '# TLS 2' in '/etc/pure-ftpd/conf/TLS' file to enable SSL/TLS encryption.
- Set the maximum number of concurrent connections: Edit the '/etc/pure-ftpd/conf/MaxClientsNumber' file to specify the maximum number of concurrent connections.
- Limit the maximum number of connections per IP address: Edit the '/etc/pure-ftpd/conf/MaxClientsPerIP' file to set the maximum number of connections per IP address.
Step 5: Start Pure-FTPd
After configuring Pure-FTPd, you can start the server using the following command:
sudo systemctl start pure-ftpd
If you want the server to start automatically at boot time, run the following command:
sudo systemctl enable pure-ftpd
Step 6: Test the FTP Server
To test the Pure-FTPd server, open an FTP client application (such as FileZilla) and connect to the server using the virtual user you created earlier.
Enter the server's IP address, port number (21 by default), and the virtual user's credentials. If everything is set up correctly, you should be able to connect to the server and transfer files.
Congratulations! You have successfully installed and configured Pure-FTPd server on Ubuntu 22.04.
Related Searches and Questions asked:
That's it for this post. Keep practicing and have fun. Leave your comments if any.
0 Comments