[gollem] Support for dynamic ftp server names, and configuring show_dotfiles

Amos Shapira amos.shapira at gmail.com
Tue Aug 2 23:00:08 PDT 2005


On 8/3/05, Michael M Slusarz <slusarz at mail.curecanti.org> wrote:
> Quoting Amos Shapira <amos.shapira at gmail.com>:
> 
> > Hello,
> >
> > I'm testing Gollem for use at a hosting provider.
> > We'd like to allow users to "just login" to gollem based on
> > credentials automatically passed from our
> > web-based management application.
> >
> > I test the latest releases - Horde 3 revision 2.13 from 2004/09/24
> > (according to the README file) and Gollem revision 1.6 from
> > 2005/06/08.
> >
> > As far as I dug into the source and googled around I haven't
> > found a way to do the following:
> >
> > 1. Dynamically list the ftp server a user should login to,
> > either receive it in a cookie or find it through some dynamic
> > query to LDAP or an SQL database.
> >
> > So for instance the FTP server for a user who own domain
> > "abc.com" would be "ftp.abc.com".
> 
> You should be able to add some code to config/backends.php to do this.
> Just change the params->hostspec value to foo_function() and define
> foo_function() at the bottom of the file and write your dynamic lookup
> code there.

Thanks for the tip. It's sort of what I guessed. Your pin-pointing
to the right line should save me tons of more digging.

Am I the first one to need such a thing from Gollem? I'd expect this
to be useful to any hosting provider, of which many must be using
Horde/Gollem.

> 
> > 2. Pass the username and password to Gollem, to be passed
> > to the FTP server.
> 
> You mean pass it through via the URL? (e.g.
> login.php?username=foo1&password=foo2)  This will work minus the
> obvious security issues inherent with this.

Obviously insecure. That's why I was thinking more of cookies.
Another option I came across is to configure Horde to accept basic
http authentication? In that case maybe the "forwarding" application
can set a realm with username:password which will be pulled by
Horde and passed to the FTP server?
It won't let me pass the domain name though, but maybe I'll be able
to figure it out from the user name in the above foo_function().

> 
> > 3. Configure things like "show_dotfiles".
> 
> This is done via config/prefs.php.  I'm not sure what you mean by
> 'configure'.  You can configure a users preferences however you want
> (just like any Horde application) by creating the desired entry in the
> preference backend.

I managed to figure that after (yet another) pass on all the options in
the Horde setup screen - the "preferences system" was practically disabled,
once I enabled it (the tables were already in the database) it worked.

BTW - the first time I tried to access the Gollem preferences (by picking
up the "File Manager" in the "Edit Options" combo-box at the top-right
corner) I got an error about missing URL, here is the URL (as copied
from the Apache error.log):
/home/ashapira/public_html/horde/gollem/http://localhost/
~ashapira/horde/services/prefs.php
(I added a new line before the "~").

Looks like something messed up the URL. A second or third trial
of re-displaying the page and trying to pick "File Manager" worked
and I was able to set Gollem's prefs.

Thanks for the extra-quick reply.

Cheers,

--Amos


More information about the gollem mailing list