To set up an FTP server on AlmaLinux 9, follow these steps:
Step 1 : Update the System
Before installing vsftpd, update your system packages:
Step 2 : Install vsftpd
Install the vsftpd
package using:
Step 3 : Enable and Start vsftpd
Once the installation is complete, enable and start the service:
Step 4 : Check vsftpd Status
Verify that vsftpd is running properly:
Step 5 : Configure vsftpd
Edit the vsftpd configuration file to disable anonymous access and allow local users to upload files:
Modify or add the following lines:
Save the file and exit.
Step 6 : Restart vsftpd
Apply the changes by restarting vsftpd:
Step 7 : Create an FTP User
Add a new FTP user:
Step 8 : Set a Password for the FTP User
Assign a password for the FTP user:
Step 9 : Configure Firewall (If Enabled)
If the firewall is active, allow FTP traffic:
Step 10 : Configure SELinux (If Enabled)
If SELinux is enabled, apply the following commands:
Step 11 : Test FTP Connection
- Open an FTP Client (e.g., FileZilla)
- Add a New Site : Go to File > Site Manager, then New Site.
- Configure the Connection
Host: Enter the server's IP address.
Port: Use 21
(default FTP port).
Protocol: Select FTP.
Logon Type: Choose Normal.
User: Enter the FTP username.
Password: Enter the assigned password.
- Click Connect to test the FTP access.
Congratulations! You have successfully set up an FTP server using vsftpd on AlmaLinux 9