gollem and passive (pasv) ftp mode

Eric Jon ROSTETTER eric.rostetter@physics.utexas.edu
Fri, 25 Jan 2002 17:04:11 -0600


I just now subscribed to this list.  I also just configured and ran 
gollem for the first time.  I'm trying to make it connect to a machine
that is firewalled such that all ftp sessions must be in passive mode.

I got it to work by the very quick hack in lib/Gollem.php of (sorry about the
line wrap)


-        if (!$gollem['stream'] ||
-            !@ftp_login($gollem['stream'], $gollem['user'],
Secret::read(Secret::getKey('gollem'), $gollem['pass']))) {

+        if (!$gollem['stream'] ||
+            !@ftp_login($gollem['stream'], $gollem['user'],
Secret::read(Secret::getKey('gollem'), $gollem['pass'])) ||
!@ftp_pasv($gollem['stream'], true)) {

Now, this is obviously a very bad patch, but it proved that this was indeed
the problem.  I'm guessing the correct action would be to:

1) Make a configuration variable (some where in gollem/config/*.php) to
specify if we require pasv mode or not.

2) Add a better reading patch similar to the above one, but conditionalized on
the config file setting.

I'm seeking comments on how best to do this, and or someone to do this for me.
I'm willing to code up the code and post a patch, but I'd at least like some
input that this is a valid thing to do, that my work wouldn't be in vain, 
that someone else hasn't already done this, etc.

Thanks!

Eric Jon Rostetter
The Department of Physics
The University of Texas at Austin
Austin, Texas 78712-1081

Office:    RLM 7.126
Telephone: 512-471-5821
Email:	   eric.rostetter@physics.utexas.edu

Fragen Sie nicht was Ihre Kumputer tun koennen,
aber fragen Sie was Sie fur Ihre Kumputer koennen.