Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Aug 2002 00:10:03 -0700 (PDT)
From:      Peter Pentchev <roam@ringlet.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/42172: ftp and fetch client needs an active command line option now
Message-ID:  <200208300710.g7U7A3ae072927@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/42172; it has been noted by GNATS.

From: Peter Pentchev <roam@ringlet.net>
To: Ted Mittelstaedt <tedm@toybox.placo.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/42172: ftp and fetch client needs an active command line option now
Date: Fri, 30 Aug 2002 09:59:57 +0300

 On Thu, Aug 29, 2002 at 05:10:04PM -0700, Ted Mittelstaedt wrote:
 >  Quoting Ian Dowse <iedowse@maths.tcd.ie>:
 >  
 >  > In message <200208291949.g7TJn3J2026751@www.freebsd.org>, Ted
 >  > Mittelstaedt writ
 >  > es:
 >  > >      Now, I know that most people are going to be saying "so what,
 >  > >all FTP servers support passive mode" but au-contraire, that is not
 >  > >true.  I ran across one that ONLY supports ACTIVE mode FTP - it is
 >  > >a network storage device called a "Snap!" server, manufactured by
 >  > >Quantum.  The lack of an active switch makes it rather difficult to 
 >  > >write scripts that deal with this device.
 >  > 
 >  > It seems that setting the environment variable FTP_PASSIVE_MODE to
 >  > "NO" should do what you want. Does that work?
 >  > 
 >  > Ian
 >  > 
 >  
 >  It does work with FTP however it doesen't appear to work with the fetch
 >  program.  (perhaps that should be a second PR, fetch not responding to that 
 >  variable?) Also this workaround doesen't address the changes that need
 >  to be made in the man page for ftp.
 
 Actually, here, on 4.6-STABLE as of yesterday, it seems to work with
 fetch(1), too:
 
 [roam@straylight:p6 ~/tmp/ff]$ fetch -v ftp://ftp.online.bg/pub/channels
 looking up ftp.online.bg
 connecting to ftp.online.bg:21
 setting passive mode
 opening data connection
 initiating transfer
 remote size / mtime: 3211 / 1010590214
 Receiving channels (3211 bytes): 100%
 3211 bytes transferred in 2.3 seconds (1.38 kBps)
 [roam@straylight:p6 ~/tmp/ff]$ env FTP_PASSIVE_MODE=NO fetch -v ftp://ftp.online.bg/pub/channels
 looking up ftp.online.bg
 connecting to ftp.online.bg:21
 binding data socket
 initiating transfer
 local size / mtime: 3211 / 1010590214
 remote size / mtime: 3211 / 1010590214
 Receiving channels (3211 bytes): 100%
 3211 bytes transferred in 1.4 seconds (2.31 kBps)
 [roam@straylight:p6 ~/tmp/ff]$
 
 Note the 'setting passive mode' in the first invocation and the lack
 thereof in the second one.  A 'fetch -v -v' would demonstrate it even
 better - fetch(1) does indeed obey "FTP_PASSIVE_MODE=NO".
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 Hey, out there - is it *you* reading me, or is it someone else?

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208300710.g7U7A3ae072927>