Subject: Re: about ftphosts file

From: Ian Willis <[email-masked]>
Date: Thu, 23 Jul 98 16:57:11 BST

On Thu, 23 Jul 1998 12:49:35, Tan Jian ([email-masked]) wrote:

| I want to limitate anonymous ftp access from xxx.xxx.xxx.xxx, then
| 
| I edit my ftphosts file, shown below:
| 
| #ftphosts
| allow    *     *
| deny     ftp    xxx.xxx.xxx.xxx
| deny    anonymous    xxx.xxx.xxx.xxx
| ( xxx.xxx.xxx.xxx means a fixed IP address)
| 
| My system is SunOS5.5.1 and ftp version is wu-ftp2.4,
| 
| (I think it is unnecessary to restart ftpd after revising ftphosts,)
| 
| nothing occurs. it seems that the ftphosts file did not take effect.
| 
| Is my file format incorrect?

The first allow or deny line that matches a host is used, so moving the
allow line after the deny lines will prevent anonymous access from host
xxx.xxx.xxx.xxx.

Also if no entry exists for a user, access is allowed, so your ftphosts
file could be:

deny	ftp		xxx.xxx.xxx.xxx
deny	anonymous	xxx.xxx.xxx.xxx
allow	ftp		*
allow	anonymous	*

I have tested this in wu-ftpd 2.4.2-beta-18, I think wu-ftpd 2.4 is
similar, the only difference I know of is that in beta-18 a username of
either ftp or anonymous specifies the anonymous user, its not necessary
to list them both.

Ian Willis
SCO Internet Engineering Group, Watford, England