• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

cant access ftp

Madness

Basic Pleskian
hi guys i enabled plesk firewall to my ip now i cant seem retrieve directory listing. ive done the same with ssh that works fine.

Response: 230 User logged in
Command: OPTS UTF8 ON
Response: 200 UTF8 set to on
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing
 
Last edited:
I had the same problem only occurred after Plesk firewall installed.

The solution I found is (copied from my server documentation):

Unable to list directories (with Filezilla, Core FTP etc)?
Check your Plesk Firewall configuration settings – if no obvious error then try this:
Remove Plesk firewall – FTP port 21 still does not work.
Reinstall Plesk firewall, don't change any settings – FTP port 21 still does not work.
Temporarily change the default setting to ACCEPT
iptables -I INPUT -j ACCEPT
Can you now connect OK? Then you have found the problem!
Regardless you first need to restore things to how they were
iptables -D INPUT 1
You won't be able to connect again
Edit file /etc/proftpd.conf – add the following line:
PassivePorts 1354 1394
Now change the firewall the allow connections on these ports:
iptables -I INPUT -p tcp --dport 1354:1394 -j ACCEPT
You will now be able to connect again. If not then you must have another problem!
Then make sure the iptables rules are remembered on reboot.
service iptables save
Make sure you are still able to connect.

Now (re)install Plesk Firewall extension.
In Extension Management click Edit Firewall.
Do not make any changes and click Apply Configuration.
Can you still connect?
If so Plesk Firewall was not the problem, if you can't Plesk Firewall is the problem!
Until a better solution found looks like you will need to execute the following commands whenever you change Plesk Firewall configuration:
iptables -I INPUT -p tcp --dport 1354:1394 -j ACCEPT
service iptables save

For fuller explanation see: http://www.bentasker.co.uk/documentation/linux/137-proftpd-not-working-with-filezilla-plesk

Any better suggestions anyone?
 
The above solution can be simplified to:
Edit file /etc/proftpd.conf – add the following line:
PassivePorts 1354 1394

In Plesk firewall add the following custom rule:
For Proftpd PassivePorts (FTP) - Allow incoming from all on port 1354-1394/tcp
This does the same thing with the advantage that in the future you do not need to remember to do it manually if you make a change to your Plesk firewall configuration.
In Plesk you can easily adjust it further if you want to be a bit more restrive as to IPs/networks allowed!
 
Back
Top