3

I have a CentOS server running VSFTPD so I can upload files to my site.

When I connect to the FTP, it lists the folders in the root directory, and I can open all of the folders apart from a folder called 'public' which just causes FileZilla to hang on "150 Here comes the directory listing."

A friend can connect to the server and access the folder just fine.

Also when I access some of the other folders I mentioned, when I try to download the files in there, it just hangs on transferring.

I have set up passive mode in vsftpd.conf and opened the ports like following:

pasv_enable=Yes
pasv_max_port=12100
pasv_min_port=12000
pasv_address=<IP ADDRESS>

IPtables:

-I INPUT -p tcp --destination-port 12000:12100 -j ACCEPT

I can connect to other FTP servers and transfer files just fine, but my own server seems to have something wrong. I have also tested it over multiple FTP accounts.

1 Answer 1

5

Make sure that you also have the "ip_conntrack_ftp" kernel module loaded, that will track related connections needed for actual data transfer. As root (or using sudo), run this:

modprobe ip_conntrack_ftp

Also make sure that SELinux (if enabled) isn't blocking your requests, make sure to use public contexts, e.g. user_home_dir_t (the default context of your homedir) will by default NOT work with an FTP server, unless you do:

setsebool -P ftp_home_dir 1

There are some other ftp related SELinux flags as well, that may be interfering in some situations. Run getsebool -a|grep ftp to see them all and look them up in the documentation for extensive descriptions.

3
  • Unfortunately I can't have the module on the server because it's hosted by OVH and they have compiled it without the module for some reason.
    – Callumpy
    Apr 29, 2014 at 12:35
  • I can connect from other networks so i'm starting to think it may be my DD-WRT box blocking me somehow. Damn this is going to be a tedious process.
    – Callumpy
    Apr 29, 2014 at 15:08
  • @Callumpy then you don't have a server, or even a VPS: just a container. Containerisation isn't VPS-lite, and you're beginning to find out why not.
    – MadHatter
    Feb 28, 2016 at 10:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .