0

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

Adam J
  • 506
  • 3
  • 17
  • 1) Try enabling extra logging and look into the log for the possible hints: https://www.jetbrains.com/help/phpstorm/troubleshooting-deployment.html#collecting-logs 2) Try connecting using FileZilla -- does it work? Detailed log there can also give some hints on what may be set wrong in PhpStorm. – LazyOne Sep 23 '21 at 22:20
  • @LazyOne - Your provided link for PHPStorm didn't solve the issue. Posting FileZilla Results here. Will research them as well. – Adam J Sep 24 '21 at 12:14
  • So FileZilla is also unable to connect? If so ... and esp based on "failed to open log file" part -- must be misconfiguration (access rights?) on vsftpd. Cannot help here at all (was commenting here from a PhpStorm user side of things) – LazyOne Sep 24 '21 at 12:54

1 Answers1

1

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.

Adam J
  • 506
  • 3
  • 17