[Yum] yum and firewalls again
Michael Stenner
mstenner at phy.duke.edu
Thu May 1 01:26:56 UTC 2003
On Wed, Apr 30, 2003 at 12:55:16PM -0500, Troy Dawson wrote:
> Hi Mike and Seth,
> With the latest 1.0 daily that has urlgrabber, we've been able to do
> some tests.
> So on the machine behind the firewall we get
>
> python urlgrabber.py ftp://server.com/path/to/file local_copy
> <hangs>
> pythons2 urlgrabber.py ftp://server.com/path/to/file local_copy
> <suceeds>
OK. I'm pretty sure this is the problem:
python 1.5's ftplib defaults to active ftp, with no easy way to change
it via the urllib interface.
To verify that this is the problem, do this:
python /usr/lib/python1.5/ftplib.py server.com path/to/file > localfile
python /usr/lib/python1.5/ftplib.py server.com -p path/to/file > localfile
The -p in the second one puts it in passive mode. If the first fails
but the second succeeds, then my suspicion is confirmed.
I would recommend that you set up your firewall to allow active ftp.
I'd like to fix it, but I REALLY don't think it's worth the extra
complexity for the triple-special-case of yum-1 via ftp behind a
firewall.
A quick and dirty fix if you must: grab /usr/lib/python1.5/ftplib.py,
change "self.passiveserver = 0" to "self.passiveserver = 1", and put
the modified version in /usr/lib/yum/. I haven't tested this, but it
should work.
If someone finds a clean way to fix it, I'd be happy to see it.
-Michael
--
Michael Stenner Office Phone: 919-660-2513
Duke University, Dept. of Physics mstenner at phy.duke.edu
Box 90305, Durham N.C. 27708-0305
More information about the Yum
mailing list