If you are looking for a secure and reliable FTP server for your CentOS 7 system, then Pure-FTPd is a great option to consider. Pure-FTPd is an open-source, lightweight, and stable FTP server that is easy to set up and use. In this article, we will guide you through the process of setting up Pure-FTPd server on CentOS 7.
Before we begin, make sure that you have root access to your CentOS 7 server and have updated all the packages to their latest versions.
Step 1: Install Pure-FTPd
The first step is to install Pure-FTPd on your CentOS 7 system. To do this, open a terminal window and run the following command:
sudo yum install pure-ftpd
This command will install Pure-FTPd and all its dependencies.
Step 2: Configure Pure-FTPd
Once the installation is complete, the next step is to configure Pure-FTPd. Open the configuration file located at /etc/pure-ftpd/pure-ftpd.conf
using a text editor of your choice:
sudo nano /etc/pure-ftpd/pure-ftpd.conf
Here are some important configuration options that you can modify:
- NoAnonymous: Set this option to
yes
if you want to disallow anonymous FTP access. - ChrootEveryone: Set this option to
yes
if you want to chroot all users to their home directory. - PureDB: This option specifies the location of the Pure-FTPd user database file. The default location is
/etc/pure-ftpd/pureftpd.pdb
.
Make the necessary changes to the configuration file and save it.
Step 3: Create FTP Users
The next step is to create FTP users who will be able to access the server. You can create new users using the following command:
sudo pure-pw useradd USERNAME -u ftpuser -d /path/to/home/directory
Replace USERNAME
with the username you want to create and /path/to/home/directory
with the directory where you want to store the user's files.
You will be prompted to set a password for the user. Make sure to choose a strong password.
Step 4: Create Pure-FTPd User Database
After creating FTP users, the next step is to create the Pure-FTPd user database. Use the following command to create the database:
sudo pure-pw mkdb /etc/pure-ftpd/pureftpd.pdb
This command will create the user database at the location specified in the PureDB
option in the Pure-FTPd configuration file.
Step 5: Start Pure-FTPd Service
Now that you have installed and configured Pure-FTPd, it's time to start the service. Use the following command to start the Pure-FTPd service:
sudo systemctl start pure-ftpd
To enable Pure-FTPd to start automatically at boot time, run the following command:
sudo systemctl enable pure-ftpd
Step 6: Test FTP Access
Finally, it's time to test whether FTP access is working correctly. Open your FTP client and connect to your server using the FTP username and password you created in Step 3. If everything is set up correctly, you should be able to access your FTP server and transfer files.
Congratulations! You have successfully set up Pure-FTPd server on your CentOS 7 system.
Related Searches and Questions asked:
That's it for this post. Keep practicing and have fun. Leave your comments if any.
0 Comments