Link to home
Start Free TrialLog in
Avatar of geeta_m9
geeta_m9

asked on

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?
Avatar of AlexPace
AlexPace
Flag of United States of America image

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.
Avatar of geeta_m9
geeta_m9

ASKER

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?
Avatar of Dave Baldwin
Is "public_html" included in the directory listing that you get?  If it is, what are the permissions listed for it?
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.
To Dave - I don't even get to the public_html directory. I do not see anything on the server side window.
SOLUTION
Avatar of geeta_m9
geeta_m9

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would like to request that this question be closed.
I selected my answer as one of the solutions because it provides the most direct answer to the problem.