Subject: Re: Password protecting files

From: [email-masked] (Andy Church)
Date: Wed, 15 Apr 1998 17:31:30 EDT

>we have a customer that wants to make groups of files available to
>different clients of his. Each group of files should be password protected.
>
>The customer is setup as a virtual FTP host and he would like his clients
>to login through anonymous ftp to his site and if they try to download a
>specific file to be prompted for a password before the transfer starts.

     Can't be done with wu-ftpd, nor have I heard of any others that have
this feature (though I admittedly haven't looked).  For that matter, even
if you added it, I don't know whether clients would support it properly.

  --Andy Church                  | If Bell Atlantic really is the heart
    [email-masked]       | of communication, then it desperately
    www.dragonfire.net/~achurch/ | needs a quadruple bypass.

---

From: Bob Luckin <[email-masked]>
Date: Wed, 15 Apr 98 17:11:49 CDT

> if you added it, I don't know whether clients would support it properly.

The closest solution I can think of is to use a separate group id for
each set of files you want to protect.  Set the permissions on the files
so that only the owner or a member of the group can read them (ie. 660).
(Or put them under a directory in the same group, which has similar
permissions (770).)

Turn on the "private" command and set up the ftpgroup access file as
documented in the ftpaccess(5) man page, so that each of these groups has
a separate password.

Then tell each user the password for the group they are in.  After they
have logged in anonymously via FTP, they can issue the following commands
to become a member of the group :-
   quote site group <group>
   quote site gpass <password>
(the word "quote" is only necessary for FTP clients which do not support the
"site" command)

Once this has been done, they will be able to pull all the files in their
group.

Basically this does what you want, apart from the fact that it doesn't
prompt the user for a password when they try to pull one of the files -
they have to know to enter the two commands above first.

I hope this helps !

Cheers, Bob
-- 
Bob Luckin      [email-masked]      "Coder, adapt !  FTP Ada, redo C"
                                 [http://www.dhc.net/~luckin/palindromes.html]