Forum Moderators: phranque

Message Too Old, No Replies

FTP issue

         

andrewsmd

2:37 pm on Mar 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I didn't know where to put this so if it should go on another board please let me know. I am having FTP issues with my machine ONLY. I can ftp from any other machine but when I use mine it doesn't work. I can get logged in but as soon as a do an ls to list the directories it says opening ASCII mode data connection for file list and then just hangs. I tried changing to binary mode and it says type set to I but then if I do an ls it says opening ASCII mode again. When I use WinSCP it gets logged in and says reading the remote directory and then gives me this error "Timeout detected.
Could not retrieve directory listing
Opening ASCII mode data connection for /bin/ls.
Error listing directory '/website'."
I have turned off my firewall and restarted my machine. This issue just started yesterday. I am running windows vista, does anyone have any thoughts or suggestions.

StoutFiles

2:56 pm on Mar 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try a different FTP program.

andrewsmd

3:26 pm on Mar 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had tried from the command line and winscp. I did find a fix. I set it to use passive mode and now it is working. Here is my question though. Why would this have been working for 8 months and then all of a sudden required me to use passive mode?

rocknbil

8:45 pm on Mar 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've been here before. Sometimes even with a single web site. I never found a good answer, but the first place to check is passive/not passive transfers. And if you can't get it via command line ftp, it's not going to work with any other program.

It could be any number of things, but the most likely suspects are something in the way your comp accesses the 'net, in your network, a firewall, an update to your comp that affected any of these.

In my case we're suspecting it was the web server's firewall and something had changed. No one knows for sure.

kaled

12:53 am on Mar 3, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This happened to me some years ago. I can't remember if the problem was my local ISP or my web host but whichever it was admitted they had changed something and that it was now necessary to use passive ftp.

Kaled.

andrewsmd

3:42 pm on Mar 3, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The thing is, I manage our web server and nothing has changed on it. It has to be something local to my pc because every other pc doesn't need passive mode. Even other pcs on the same LAN.

rocknbil

7:47 pm on Mar 3, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It could be an update that hosed up TCP/IP?

In the cases I've seen, same deal, someone on a remote connection, different bandwidth, everything, no problem. It was just me that couldn't get to it. Certainly revives any paranoia you may have. :-P

Do you also have control over the server's network and the bandwidth connecting to it? If you do, ignore, but if it's a leased server or your server in someone's rack, it could be something else.

I had one "like" this (different from the above) where we simply could not get in from my location. The server was actually in his office, but it was on an ISP's bandwidth (he was warned . . . anyway . . .)

We'd do a traceroute, and watch it go all the way up to the last router before the trace would time out. We could get to the pages via HTTP, but in this case, SFTP and FTP just failed at this point.

Especially if they told you to use passive mode, I'm thinking something on their network was updated or changed.

lammert

6:59 pm on Mar 4, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If FTP normal mode doesn't work but passive mode works, it is a firewall setting somewhere, either in your PC or in some network part between the PC and the server. FTP is about the only network protocol which needs two connections between the client and the server to function successfully. One connection is used for the commands, the second connection is used to transfer the data. The second connection is only made after a request is started to transfer data. This could either be a data transfer, or a something like a directory listing. In the normal FTP way of working the server initiates the start of the data connection. If a firewall in between doesn't allow new connections from the server back to the FTP client, the data connection is blocked and this is where the behavior which you describe starts. I.e. you can give the command for a directory listing but because the data connection from the server back to the client is blocked, the connection will eventually timeout.

With a passive FTP connection the client initiates the data connection instead of the server, and this is often allowed by firewalls.

andrewsmd

9:58 pm on Mar 4, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the information. I wasn't really too familiar with the inner workings of FTP. This website is great. Thanks,