From: Bodo S. <bo...@le...> - 2011-10-21 16:48:34
|
Hi folks, I'm experiencing problems with the FTP server patch of r6435. When I issue the 'ls' command right after logging into Krang's FTP server, the FTP client hangs after showing the file listing. ftp> ls 227 Entering Passive Mode (209,59,186,8,247,220) 150 Opening data connection for file listing. total 1 drwxrwxrwx 2 nobody nobody 0 Jan 1 1970 . drwxrwxrwx 2 nobody nobody 0 Jan 1 1970 .. drwxrwxrwx 2 nobody nobody 0 Jan 1 1970 xxxx drwxrwxrwx 2 nobody nobody 0 Jan 1 1970 yyyy drwxrwxrwx 2 nobody nobody 0 Jan 1 1970 zzzz drwxrwxrwx 2 nobody nobody 0 Jan 1 1970 uuuu drwxrwxrwx 2 nobody nobody 0 Jan 1 1970 digitalcontentproducer receive aborted waiting for remote to finish abort 226 Listing complete. Data connection has been closed. 226 Command aborted successfully. After doing a 'cd', the 'ls' works too, however. Using the browser, my customer reports that he gets an IO error (read timeout). Can you confirm this? Do you have any ideas what's going wrong here? Should we revert this patch.- Thanks, Bodo On 10/14/2010 06:35 PM, mp...@kr... wrote: > Revision: 6435 > Author: mpeters > Date: 2010-10-14 12:35:13 -0400 (Thu, 14 Oct 2010) > Log Message: > ----------- > Fix bug of krang_ftpd where the new FTP daemon wasn't always detaching itself from the terminal process that started it, thus hanging SSH sessions when trying to disconnect. > > Modified Paths: > -------------- > trunk/krang/lib/Krang/FTP/Server.pm > > Modified: trunk/krang/lib/Krang/FTP/Server.pm > =================================================================== > --- trunk/krang/lib/Krang/FTP/Server.pm 2010-10-14 16:33:00 UTC (rev 6434) > +++ trunk/krang/lib/Krang/FTP/Server.pm 2010-10-14 16:35:13 UTC (rev 6435) > @@ -6,10 +6,11 @@ > use Krang::ClassLoader Conf => qw(KrangUser KrangGroup); > use Krang::ClassLoader 'User'; > use Krang::ClassLoader Log => qw(debug info critical); > -use Net::FTPServer; > use Krang::ClassLoader 'FTP::FileHandle'; > use Krang::ClassLoader 'FTP::DirHandle'; > use Krang::ClassLoader DB => qw( forget_dbh ); > +use Net::FTPServer; > +use Proc::Daemon; > > # Inheritance > our @ISA = qw(Net::FTPServer); > @@ -266,6 +267,16 @@ > return "Unknown error occurred."; > } > > +# override Net::FTPServer's forking sub so that we properly close > +# our IO handles to the terminal. Not sure why Net::FTPServer doesn't > +# do this because it does try. But Proc::Daemon does a better job and > +# actually gets it right > +sub _fork_into_background { > + my $self = shift; > + Proc::Daemon::Init(); > +} > + > + > 1; > > =back > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Krang-CVS mailing list > Kra...@li... > https://lists.sourceforge.net/lists/listinfo/krang-cvs > > |