General discussion


FTP ls and dir hangs

By maojn ·
Hi, My script suddenly failed 2 weeks ago after working for years. 'ls' command hangs after the script loggin anonymously. This script was written in c shell. I also have another script written in perl and use the Net::ftp module to ftp the same exact site and 'ls' without any problem. Could someone please tell me what suddenly went wrong and what can I do to make my script work again? Thank you very much!!!

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Comments

Collapse -

by cpfeiffe In reply to FTP ls and dir hangs

This sounds like passive v. non-passive. Due to firewall configuratins some sites require passive to be on for FTP to work. Once you open an ftp session (before you type anything else after the session is open) type passive. You can put this in your shell script to do as such and it should work. I'm not sure but I'm going to guess that the Perl module uses passive by default. Good luck.

Back to Linux Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums