[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 668
  • Last Modified:

Cannot Access Directory on Server via FTP Client

I am trying to connect to the server using Filezilla. I can make the connection, but I can't access the directory on the server, i.e., public_html. Instead I obtain the following message:

Status: Connecting to IP Address...
Status: Connection established, waiting for welcome message...
Response: 220 SAI New FTP Server ready.
Command: USER user_name
Response: 331 Password required for user_name
Command: PASS **********
Response: 230 User user_name logged in
Command: OPTS UTF8 ON
Response: 200 UTF8 set to on
Status: Connected
Status: Retrieving directory listing...
Command: CWD /public_html/
Response: 250 CWD command successful
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode IP Address.
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing

Why is this happening and what can I do to fix it?
0
geeta_m9
Asked:
geeta_m9
  • 5
  • 3
2 Solutions
 
AlexPaceCommented:
Filezilla connected, authenticated, but then failed to open the data channel.

The server's response to the PASV command should have 6 comma separated numbers... the first 4 are the server's IP address and the last 2 are the encoded port number.  To decode the port number you can multiple the 5th number by 256 and then add the value of the 6th number to the result.

To fix it, ask the remote server administrator for the server's passive port range and then take that to your firewall guy and tell him you need to be able to make an outbound connection to that FTP server's address for any port in that range.
0
 
geeta_m9Author Commented:
There are six sets of comma seperated numbers as you stated, with the first four sets of numbers being the server's IP address. The last set of numbers consist of 3 digits each, e.g.,

123, 456. I am not sure what you mean when you say to multiply the 5th number by 256. Are you saying I should multiply 123 with 256 and add the result of that to 456?
0
 
Dave BaldwinFixer of ProblemsCommented:
Is "public_html" included in the directory listing that you get?  If it is, what are the permissions listed for it?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AlexPaceCommented:
The server's PASV response indicates which port it is listening for your data channel connection request... for the example of 123,456, and ignoring that the number 456 is too big, the math for determining the data channel port number is:

(123 * 256) + 456 = 31944

The server will typically cycle through all of the ports available in its range so, if its range in this case was configured to be 31500 to 32000 then mostly likely it would attempt to answer the next passive requests on 31945, 31946, 31947 and so on until it hits 32000 and then restart at the bottom of the range.  That is not a requirement of the spec it is just something I've noticed about server behavior.  Anyway, contact the administrator of the FTP server and that person will be able to tell you the passive port range that you need to allow through your firewall.
0
 
geeta_m9Author Commented:
To Dave - I don't even get to the public_html directory. I do not see anything on the server side window.
0
 
geeta_m9Author Commented:
I was able to connect by changing the mode from Passive to Active. I found the answer here:

https://forum.filezilla-project.org/viewtopic.php?f=2&t=20338

It looks like the port range was configured for Active mode and not Passive.
0
 
AlexPaceCommented:
In Active Mode the server initiates a connection back to your client so it is not as widely supported as Passive Mode because most administrators get nervous allowing incoming connections to client machines behind the firewall.

That said, if the firewall on the remote server's side is expecting the server to only use Active Mode then there is nothing you can do as the client to force it to use passive since even if you send PASV and the server responds with a port number it is listening on that doesn't do you any good if the server-side firewall blocks your incoming connection request.
0
 
geeta_m9Author Commented:
I would like to request that this question be closed.
0
 
geeta_m9Author Commented:
I selected my answer as one of the solutions because it provides the most direct answer to the problem.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now