Are you looking to set up an FTP server on your Red Hat Enterprise Linux 8 (RHEL 8) system? Pure-FTPd is a popular and secure FTP server software that can help you get started with ease. In this beginner's guide, we will walk you through the steps to install and configure Pure-FTPd server on RHEL 8.
Before we get started, make sure you have root or sudo privileges on your RHEL 8 system.
Step 1: Install Pure-FTPd Server
To install Pure-FTPd server, run the following command in your terminal:
sudo dnf install pure-ftpd
Step 2: Start Pure-FTPd Service
Once the installation is complete, you can start the Pure-FTPd service by running the following command:
sudo systemctl start pure-ftpd
To ensure the service starts automatically at boot, run the following command:
sudo systemctl enable pure-ftpd
Step 3: Configure Pure-FTPd Server
By default, Pure-FTPd server is configured to allow anonymous login. However, this is not recommended for security reasons. To disable anonymous login, open the Pure-FTPd configuration file in your favorite text editor:
sudo vi /etc/pure-ftpd/pure-ftpd.conf
Find the line that reads
# AnonymousOnly yes and change it to
AnonymousOnly no. Save and close the file.
Step 4: Create FTP Users
To allow users to connect to your FTP server, you need to create FTP users on your RHEL 8 system. To add a new user, run the following command:
sudo pure-pw useradd USERNAME -u ftpuser -d /path/to/user/home/directory
Replace USERNAME with the desired username and /path/to/user/home/directory with the actual path to the user's home directory. You will be prompted to enter a password for the user.
Step 5: Update Pure-FTPd User Database
After creating a new FTP user, you need to update the Pure-FTPd user database with the following command:
sudo pure-pw mkdb /etc/pure-ftpd/pureftpd.pdb -f /etc/pure-ftpd/pureftpd.passwd
Step 6: Allow FTP Access Through Firewall
If you have a firewall enabled on your RHEL 8 system, you need to allow FTP traffic through it. Run the following commands to open the FTP ports in your firewall:
sudo firewall-cmd --add-service=ftp --permanent
sudo firewall-cmd --reload
Step 7: Connect to Your FTP Server
You can now connect to your FTP server using any FTP client software. Simply enter the IP address or hostname of your RHEL 8 system, your FTP username, and password to connect.
Congratulations! You have successfully installed and configured Pure-FTPd server on RHEL 8.
- To remove a user from the Pure-FTPd user database, run the following command:
sudo pure-pw userdel USERNAME -f /etc/pure-ftpd/pureftpd.passwd -m
- To configure Pure-FTPd to use TLS encryption, refer to the official Pure-FTPd documentation.
Related Searches and Questions asked:
That's it for this post. Keep practicing and have fun. Leave your comments if any.
Post a Comment