This is how I successfully configured ftp connection after 3 days of getting FileZilla Directory retrieving Errors Ubuntu-22
Server Details:
Froxlor server management software on Ubuntu 22.04 operating system.
VPS Provider : Oracle
Guide
First, I selected pureftpd in system settings ftp server
Then ssh command
sudo echo 1 > /etc/pure-ftpd/conf/TLS
Then these commands one by one. Replace YOURIPHERE with your server IP.
cd /etc/pure-ftpd/conf
sudo bash -c 'echo "35000 36000" > PassivePortRange'
sudo bash -c 'echo "YOURIPHERE" > ForcePassiveIP'
sudo bash -c 'echo "yes" > DontResolve'
From there, I opened these ports through Oracle(VPS instance provider) dashboard
"Custom TCP Range" 35000 36000
"Custom TCP Range" 21
Finally, I run this ssh command to allow these ports in iptables
sudo iptables -I INPUT -p tcp --dport 35000:36000 -j ACCEPT
sudo netfilter-persistent save
sudo service apache2 restart
sudo reboot
ref
https://docs.cpanel.net/knowledge-base/ftp/how-to-enable-ftp-passive-mode/