![]() |
FTP - Can connect, but can't get a listing
I'm here at my Mom's house sharing her internet connection. She's hard wired to the cable-modem and I'm sharing the connection via her internal airport card. Seems to work fine for everything except FTP.
I can successfully connect to my web host's FTP server, but that's it. Any command (ls, for example) simply times out. Oddly, I was able to SSH into my home machine and do a proper FTP connection, including moving files around, from there. Why can I connect, but not do anything useful from this shared connection at Mom's house? |
FTP uses more than just port 21 so you would need to port forward more ports to get it working, but it isn't secure. Use SSH (Remote Login) and be sure that all account passwords are strong.
|
You might need to set your Mac to use passive FTP (PASV) in the Proxy section of Network preferences
|
Mac is set to use passive FTP. Oddly I can change directories, but can't do a listing:
Quote:
But, when I SSH to my home machine I can log in, change directories, list files, put and get files, etc. Very, very odd. |
Have you tried 'dir' instead of 'ls' ?
And tried 'ls' without the "-a" ? |
Quote:
Code:
ftp> lsCode:
Remote system type is UNIX.So strange.... |
Passive mode FTP and firewalls
Passive mode FTP and a local firewall are very difficult to get working correctly. As cwtnospam posted earlier, just opening port 21 on a firewall isn't sufficient to get FTP working. Run a google search for passive FTP and firewalls, you will get some decent troubleshooting tips.
|
I'd accept this except that when I ssh to my home machine I am running passive ftp behind a firewall and it works as expected. All machines running 10.4.8 and configured identically: passive ftp, ports 20 & 21 open on the firewall.
And, why do some ftp command work (cd, for example) and others not (ls, for example)? Are you trying to say that different ftp commands use different ports? That "cd" uses 21 but "ls" uses something else? BTW, did the Google search on "passive ftp firewall" and didn't come up with anything helpful. |
|
Trevor -
Thank-you. I read that and I think I understand it. But, it still doesn't explain to me why the cd command works but the ls command does not. Code:
Smooch:~ mnewman$ ftp -d ftp.xxxxxx.comCode:
230 OK. Current restricted directory is / |
Oddly, if I go to the host machine (the one connected to the cable modem) I can do a proper ftp session.
I can only assume that the problem with the machine sharing the connection is that the OS/X Internet sharing doesn't do NAT properly for the ports necessary for passive FTP. Any way to fix that? |
Quote:
|
I am experiencing the same problem. Has anybody figured this out?
Thanks |
I think that PASV mode also requires ports 3000-3008 to be open to work properly.
Joe VanZandt |
I scanned ports 3000-3999 using ShieldsUP and passed their "true stealth analysis."
https://www.grc.com/x/ne.dll?bh0bkyd2 How else can I find out if the ports are open/closed? |
Also, I have two machines on the same network running 10.4.8 and only one is receiving the error (unable to get listings using "ls" 421 error).
|
You might have to check the port forwarding on your Mother's router to see if they are open and being forwarded.
Joe VanZandt |
I got into the exact problem and I have fixed it by opening incoming FTP port on the client machine. So the machine where from the connection was made to the FTP server should accept incoming FTP requests for this to work.
Srinivas Siddireddy |
I got into the exact problem and I have fixed it by opening incoming FTP port on the client machine. So the machine where from the connection was made to the FTP server should accept incoming FTP requests for this to work.
Srinivas Siddireddy Infozeal.com |
I have the exact same issue. Running Windoze 7 on client machine, using built-in FTP command. Server is running Filezilla (also under Windoze 7). Ports are forwarded correctly on server-side and I successfully connect (PASV) from other client machines. Yet here I fail, whereas other client software seems to connect successfully from the same computer. Also, I tried disabling firewall completely, no difference. Ideas?
|
The Windows commandline FTP client only supports active FTP, not passive.
Neither the server, nor the client are running OS-X. Why are you posting your question on an OS-X forum? |
And why is a 6 year old thread being resurrected for the third time?
|
| All times are GMT -5. The time now is 07:13 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.