A Beginner's Guide to Setting up Pure-FTPd Server on Ubuntu 20.04
Setting up an FTP (File Transfer Protocol) server is a fundamental step for anyone looking to efficiently manage file transfers between computers. Pure-FTPd is a lightweight and secure FTP server that's easy to install and configure. In this guide, we'll walk you through the process of setting up Pure-FTPd on Ubuntu 20.04, providing step-by-step instructions and useful examples to ensure a smooth setup.
Installing Pure-FTPd:
To begin, let's install Pure-FTPd on your Ubuntu 20.04 system. Open your terminal and enter the following command:
sudo apt update
sudo apt install pure-ftpdThis will update your package list and install Pure-FTPd on your machine.
Creating a System User for FTP:
Pure-FTPd requires a dedicated system user to manage FTP connections. Create a new user using the following command:
sudo adduser ftpuser
Follow the prompts to set a password and other user details.
Configuring Pure-FTPd:
Now, let's configure Pure-FTPd to use our newly created user. Open the configuration file using a text editor:
sudo nano /etc/pure-ftpd/conf/PureDB
Change the line to use the system user we created:
echo "yes" | sudo tee -a /etc/pure-ftpd/conf/PureDB
Save the changes and exit the text editor.
Creating a Virtual User:
If you prefer virtual users instead of system users, Pure-FTPd supports that as well. Create a virtual user by running:
sudo pure-pw useradd newftpuser -u ftpuser -d /path/to/ftp/folder
sudo pure-pw mkdbReplace
newftpuser
with your desired username and adjust the directory path accordingly.Starting Pure-FTPd:
Start the Pure-FTPd service to apply the changes:
sudo systemctl start pure-ftpd
To enable Pure-FTPd to start on boot, run:
sudo systemctl enable pure-ftpd
Your FTP server is now up and running.
Testing the FTP Connection:
Use an FTP client to connect to your server. Enter the server's IP address or hostname, your username, and password.
ftp your-server-ip
Replace
your-server-ip
with the actual IP address of your server.
More Examples:
Setting up SSL/TLS:
For added security, you can configure Pure-FTPd to use SSL/TLS. Generate a certificate using the following command:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
Update the Pure-FTPd configuration file to use the certificate:
sudo echo "2" | sudo tee -a /etc/pure-ftpd/conf/TLS
Restart Pure-FTPd for the changes to take effect:
sudo systemctl restart pure-ftpd
Related Searches and Questions asked:
That's it for this topic, Hope this article is useful. Thanks for Visiting us.