sudo dnf install vsftpd -y
sudo systemctl enable vsftpd --now
sudo systemctl status vsftpd
By default, the Rocky Linux firewall blocks FTP traffic. Allow it:
sudo firewall-cmd --permanent --add-service=ftp sudo firewall-cmd --reload
Edit the configuration file:
sudo nano /etc/vsftpd/vsftpd.conf
Here are the most important settings:
Allow local users to log in:
local_enable=YES
Allow file upload (write access):
write_enable=YES
Enable chroot to restrict users to their home directories:
chroot_local_user=YES
Allow passive mode (important for FTP clients behind NAT/firewalls):
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=50000
sudo systemctl restart vsftpd