Re: [expert] anonymous ftp login

2001-04-03 Thread Mark Weaver

Hi Mike,

The first thing you want to do is make sure you have the package anonftp
installed on your system.

rpm -qa | grep anonftp

If you do you will get a response from your system that looks like this;

anonftp-3.0-14mdk

The next thing you will want to do is read and follow very carefully the
instructions that I've sent along. this is what I used to configure and
get going my anonymous ftp. If you have any troubles please feel free to
email me.

Mark

Mike & Tracy Holt wrote:
> 
> Hello experts
> I sent this a couple of days ago, but I'm not sure if it went through.
> Could someone either explain the procedure for making /var/ftp/pub available
> to anonymous login or possibly point me to a howto?
> 
> Thanks in advance, Mike

 
  Copyright (c) 1999,2000 WU-FTPD Development Group.  
  All rights reserved.
  
  Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994
The Regents of the University of California.
  Portions Copyright (c) 1993, 1994 Washington University in Saint Louis.
  Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc.
  Portions Copyright (c) 1989 Massachusetts Institute of Technology.
  Portions Copyright (c) 1998 Sendmail, Inc.
  Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P.  Allman.
  Portions Copyright (c) 1997 Stan Barber.
  Portions Copyright (c) 1997 Kent Landfield.
  Portions Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997
Free Software Foundation, Inc.  
 
  Use and distribution of this software and its source code are governed 
  by the terms and conditions of the WU-FTPD Software License ("LICENSE").
 
  If you did not receive a copy of the license, it may be obtained online
  at http://www.wu-ftpd.org/license.html.
 
  $Id: upload.configuration.HOWTO,v 1.2 2000/07/01 18:49:32 wuftpd Exp $
 


   Upload Configuration
  HOW-TO

This document is available on-line at:
  ftp://ftp.wu-ftpd.org/pub/wu-ftpd/upload.configuration.HOWTO

One of the more powerfull, yet most often misused, features of WU-FTPD is
the upload clause.  Historically, the problems with the upload clause stem
from unclear documentation and poor implementation.  This document is an
attempt to address these issues.  The features discussed in this document
apply to WU-FTPD Version 2.6.0.  If you are not running 2.6.0, you are
strongly encouraged to upgrade; it includes a number of corrections, new
features and security enhancements not available with earlier versions of
WU-FTPD.



Upload restrictions for anonymous FTP users
---
For this example, we'll assume your system /etc/passwd file contains an
entry for the anonymous FTP user as follows:

ftp:*:95:95::/home/ftp:

If your /etc/passwd file does not contain an entry for the user 'ftp' your
site will not allow anonymous FTP.  In addition, if the usernames 'ftp' or
'anonymous' appear in the /etc/ftpusers file, anonymous FTP will not be
allowed.

In /etc/ftpaccess, we need a class which allows anonymous access.  The
following allows anonymous FTP from anywhere:

class anonftp anonymous *

To prevent anonymous FTP users attempting a Denial of Service (DoS) attack
against your system, you should create a special filesystem to receive
their uploads.  This separate filesystem protects your server by limiting
the total size of all uploaded files while preventing those files from
consuming all available space on the server.  For this example, mount the
filesystem on /home/ftp/incoming

By default, the server will not allow uploads from anonymous FTP users.
Just to be safe, and so we don't forget, let's add a clause saying that:

upload /home/ftp * no

What this says is, "For any user whose home directory is the anonymous FTP
area, /home/ftp, do not allow any uploads."  As I said, this is the
default, but put it in anyway so you don't forget.

Now, we want to allow uploads into the incoming filesystem.  We MUST add a
clause granting that privilege to anonymous users.  Right now we don't want
to let anonymous users create directories.  (I recommend NEVER allowing them
to do it, but I'll show you how in a bit.)  We want to ensure, however,
the server is safe and cannot be used as a way-point for software pirates
(warez traders).  So we'll set the directory permissions for the incoming
area to prevent anyone seeing what's there and make the area write-only for
anonymous users.

First, we need an FTP site administrator, someone who owns the files, but
isn't the root user or the anonymous user.  Something like the following
/etc/passwd entry will do:

ftpadmin:*:96:96::/home/ftp:

Set the incoming area permissions and ownership to safe values.  I
recommend the following:

chown ftpadmin /home/ftp/incoming
chgrp ftpadmin /home/ftp/incoming
chmod 3773 /home/ftp/incoming

Actually, ftpadmin should own more of the site, but I'm only talking about
uploads right now.

Finally, before we get into allowing uploads, on

[expert] anonymous ftp login

2001-04-02 Thread Mike & Tracy Holt

Hello experts
I sent this a couple of days ago, but I'm not sure if it went through.
Could someone either explain the procedure for making /var/ftp/pub available
to anonymous login or possibly point me to a howto?

Thanks in advance, Mike