Subject: Re: no-retrieve/allow-retrieve problems

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 9 Jun 1999 16:45:06 -0400 (EDT)

On Wed, 9 Jun 1999, Yusef Badri wrote:

> class admin real localhost admin1-host admin2-host
> class webstats real stats-host 192.168.68.0/23
> class cust1 real cust1-host
> class cust2 real cust2-host
> 
> noretrieve / core
> allow-retrieve class=admin / core
> allow-retrieve class=cust1 /disk2/wwwroots/cust1/htdocs
> allow-retrieve class=cust2 /disk2/wwwroots/cust2/htdocs
> allow-retrieve class=webstats /disk2/wwwroots
> 
> The intention is that no customer can retrieve any files, unless
> explicitly allowed by an allow-retrieve command. When I log in from
> 192.168.68.0/23 (ie. as class=webstats), I am always able to retrieve
> files in /etc, despite the noretrieve command. If I comment out the
> "allow-retrieve class=admin / core" entry, then the server does refuse
> to fetch /etc/passwd, but it also refuses to fetch valid files, eg.
> /disk2/wwwroots/cust1/htdocs/index.htm It's as if I'm always treated
> as class=admin.

Take out the 
  allow-retrieve class=admin / core
And see what happens.  If that fixes it, you were _not_ 'webstats' but
wre, in fact, 'admin'.

> Can anybody spot what I'm doing wrong ?

Frankly, no.  But the class= stuff is too simplistic and could be the
cause of your problem.

Looking at what you're trying to do I'd suggest it's be more secure to
make your users guest rather than classify them based upon IP number.  I'd
also suggest 'admin' has no place on a server connected to the Internet.

> Also, what is the meaning of the undocumented, optional "-" field in
> the allow-retrieve directive (comes before the filename list).

Hmm.  I thought iswas documented.  anyway, the idea is to stop the parse
for parameters (class=) and start looking for filenames.  that way you can
mark a file named 'class=cs-101' (non-)retrievable.

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Yusef Badri <[email-masked]>
Date: Wed, 9 Jun 1999 20:56:07 +0100

Hello all,

I'm using wu-ftpd-2.4.2-vr17 on Solaris 2.6, and cannot get this feature to
work.

Here is my ftpaccess file
=========

noretrieve / core

compress yes *
tar yes *

log commands real,guest,anonymous
log transfers real,guest,anonymous inbound,outbound
log security real,guest,anonymous

passive ports 57.6.80/23 21000  22000

passwd-check none warn

greeting brief
email [email-masked]
========

The intention is that no customer can retrieve any files, unless explicitly
allowed by an allow-retrieve command.
When I log in from 192.168.68.0/23 (ie. as class=webstats), I am always able
to retrieve files in /etc, despite the noretrieve command.
If I comment out the "allow-retrieve class=admin / core" entry, then the
server does refuse to fetch /etc/passwd, but it also refuses to fetch valid
files, eg. /disk2/wwwroots/cust1/htdocs/index.htm
It's as if I'm always treated as class=admin.

Can anybody spot what I'm doing wrong ?
Also, what is the meaning of the undocumented, optional "-" field in the
allow-retrieve directive (comes before the filename list).

Thanks in advance
Yusef