I recently installed vsftpd on a server at my home for local development utilizing CentOS7. I went through the setup, and enabled passive mode, set up my ports, put my port forwarding on in my router, and then when I go to connect through PhpStorm, it rejects the connection.
I'm not sure what's going on, I've tried enabling Anonymous login, using a user, root. Nothing seems to work. Please let me know any information I can add.
The result from Test Connection is as follows:
Connection to '10.0.0.110' failed.
Connection to FTP server on "10.0.0.110" rejected.
Here are results from a FileZilla attempt.
Status: Connecting to 10.0.0.110:40000...
Status: Connection established, waiting for welcome message...
Response: 500 OOPS: failed to open xferlog log ile:/var/log/vsftpd/vsftpd.log
Error: Critical error: Could not connect to server
Alright, so here is the answer, after looking in to what @LazyOne posted. I needed to change permissions as the first step. chmod 644 / 755
for files / dirs.
After that, I added in a listen_port=40000
to my vsftpd.conf file.
Then, I added in port_enable
, pasv_address=<my internal ip address for my server>
and lastly, pasv_addr_resolve=NO
, as I have a static IP on my server.
I also added additional ports to the passive settings 40000-40500
, as I've read this will allow multiple connections and will solve another error I was having.
After all of this, I opened up the ports in my server firewall-cmd --add-port=40000-40500/tcp --permanent
, and added port forwarding in my router to allow this.
After all was said and done, I was finally able to connect to my FTP.
Hopefully this will help someone.