Solved

Cannot Access Directory on Server via FTP Client

Posted on 2014-02-04
9
641 Views
Last Modified: 2014-02-11
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
Comment
Question by:geeta_m9
  • 5
  • 3
9 Comments
 
LVL 16

Expert Comment

by:AlexPace
ID: 39833685
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
 

Author Comment

by:geeta_m9
ID: 39833720
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
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39833796
Is "public_html" included in the directory listing that you get?  If it is, what are the permissions listed for it?
0
 
LVL 16

Expert Comment

by:AlexPace
ID: 39833821
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:geeta_m9
ID: 39833939
To Dave - I don't even get to the public_html directory. I do not see anything on the server side window.
0
 

Assisted Solution

by:geeta_m9
geeta_m9 earned 0 total points
ID: 39834283
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
 
LVL 16

Accepted Solution

by:
AlexPace earned 400 total points
ID: 39834411
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
 

Author Comment

by:geeta_m9
ID: 39840509
I would like to request that this question be closed.
0
 

Author Closing Comment

by:geeta_m9
ID: 39849681
I selected my answer as one of the solutions because it provides the most direct answer to the problem.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Ever had certain email messages or responses that you find yourself using over and over again? Do you use Google's Gmail system? If so, then this article is here to help you save time by teaching you how to create email templates from …
The biggest nightmare for any Exchange Server Administrator is to keep the server running without any issue. But the problems often come and they need to be resolved efficiently and timely. Here are important troubleshooting points: Define the Pr…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now