[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Open Source file delivery for apache



On Sat, Nov 23, 2002 at 02:59:22PM +0100, Lukas Ruf wrote:

| This means, a person should be able to register herself by providing a
| least a valid email address to which an access code is sent to.  This
| access code is then used to download the respective tar-files.

I don't know of any existing system, but it should be quite trivial to
code yourself.

For the simplest approach use a .htpasswd file to restrict access to
the directory containing the files.  Then write a CGI script that
takes the user's email address, generates a random password string
(there is some debian package to do the password generation), then
call 'htpasswd' to add the email address as a user name and the
password to the end of the .htpasswd file and email the person the
password.

I expect the CGI script to be under 50 lines of code at the most.  It
should be doable in shell (which is suitable due to the extensive use
of external programs) but could also be done easily in python or perl.

HTH,
-D

-- 
But As for me and my household, we will serve the Lord.
        Joshua 24:15
 
http://dman.ddts.net/~dman/

Attachment: pgpS79pmKgHIf.pgp
Description: PGP signature


Reply to: