Configure AWS for Pureftpd

The ftp account is correct, but failed to get directory list: “Could not retrieve directory listing”. Strange, isn’t it?

At first, I thought it was something wrong with the ftp add user script. So I tried to do it manually but still didn’t work.

After a one-hour research, here is the answer: I should use passive mode. And for Pureftpd to run on passive mode, I should open more ports to the public. So this is mainly a firewall issue.

Update the pure-ftpd.conf:

I don’t really need that much ports open to the public. Let’s narrow it down.

Then, adjust the aws firewall rules accordingly.

Restart the pureftpd, and you’re done.

By the way, it’s easy to set up permissions for pure-ftpd. The script from oneinstack provides a very good example:

If you’re using www for nginx, set $run_user=www, so that the pureftpd will also run as www. As easy as that.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.