Inference Group
.


New User



Search :
.
Subject: ftp access (vs http)
From: Sanjoy Mahajan 

I've made a stopgap fix to the ftp access rules to make them more like
the http rules.  

In wol's /usr/local/lib/ftpd/ftpaccess I added the middle line below
(the 'cam' class):

class   local   real,anonymous *.ra.phy.cam.ac.uk
class   cam     real,anonymous *.cam.ac.uk
class   remote  real,anonymous *

An ftp session gets the first matching class (so order matters).

Then I added this line, which prevents remote people (i.e. anyone not
matching the local or cam wildcards) from getting files in the listed
directories.  These directories all had .htaccess files, which had the
same restrictions (anyone within cam could read them):

noretrieve      class=remote /archive/ftp/pub/www/is/computers /archive/ftp/pub\
/www/is/info /archive/ftp/pub/www/is/data/elongation

There are a few more directories with .htaccess files:

/archive/ftp/pub/www/mackay/local/.htaccess
/archive/ftp/pub/www/mackay/reviews/.htaccess
/archive/ftp/pub/www/mcdavey/squash/.htaccess

(There are a few other .htaccess files but they are http-specific, and
don't put restrictions on retrieval.)  If you want to add more
directories with restrictions, it's easy, or let me know and I'll do
it.

I tested the new configuration by trying from Princeton to grab a file
from wol's is/info.  The server complained that it's marked
noretrieve, so that test was passed.  A possible problem is that you
can get a directory listing even if you cannot retrieve the files in
the directory, but I couldn't figure out how to configure ftpaccess to
avoid that problem.

-Sanjoy


The Inference Group is supported by the Gatsby Foundation
and by a partnership award from IBM Zurich Research Laboratory
New User
Site last modified Fri Nov 22 11:55:17 GMT 2002