Net::FTPServer::PWP - The FTP server for PWP (personal web pages) service.
ftpd [-d] [-v] [-p port] [-s] [-S] [-V] [-C conf_file]
Net::FTPServer::PWP is a Net::FTPServer server personality. This personality implements a complete FTP server with special features to support an environment we call PWP.
What we call PWP (Personal Web Pages) is a particular scenario where possibly millions of users share a pool of "stateless" FTP servers that access filesystems where their personal web pages are stored. In this scenario, it is impractical to assign a unique user-id to each user for permission control. Also, the authentication depends on an external AAA server, which in our case is a RADIUS server.
We based the implementation in the Net::FTPServer framework, which provides complete FTP server functionality. Our architecture is discussed later.
The features provided include:
We chose to implement a direct RADIUS authentication rather than using a service such as PAM, because we wanted to get back from the RADIUS server some of the operational parameters, such as the user quota and the home directory.
For this, we use Vendor-Specific Attributes with an arbitrarily chosen vendor identifier of 582. Of course, you can change this id in the dictionaries involved and the config file, and nobody should complain.
Please take a look at the pwp-dictionary file that was distributed along this module, in order to see the actual attributes used.
This is based on Maildir++. It consist on maintaining a file (
.pwpquota by default) with the size of each file in the user's directory. Every time a file is stored in the FTP space, a line is added to the
.pwpquota file. The file is invalidated after a number of operations or after a given time period.
This implementation is gentle to the NFS servers we use in our network to host users' FTP space.
Currently, the recovery of space through the use of DELE commands doesn't work reliably, as the size of the deleted file is not available at the time the quota hook is called. However, a later version will most likely correct this problem.
Net::FTPServer. Through the overloading of some key methods, introduces the user authentication and the quota mechanisms.
Net::FTPServer::Full::FileHandle. Does not provide any methods. It's there just for academic completeness.
Net::FTPServer::Full::DirHandle. Overrides the
->delete() method to provide a work-around for a bug found in Darwin.
The complete class hierarchy is shown below. The interesting classes or modules, are the ones marked with an asterisk.
Net::FTPServer | + Net::FTPServer::Handle | | | +-Net::FTPServer::PWP::Handle (*) | +-Net::FTPServer::PWP::Server (*) | +-Net::FTPServer::Full | +-Net::FTPServer::Full::Server | +-Net::FTPServer::Full::DirHandle | | | +-Net::FTPServer::PWP::DirHandle (*) | +-Net::FTPServer::Full::FileHandle | +-Net::FTPServer::PWP::FileHandle (*)
Net::FTPServer::PWP::DirHandle also inherit from
Net::FTPServer::PWP::Handle inherits from
This double inheritance is used to implement a jail, similar to the use of
chroot(), which prevents users from interacting with files or directories outside their PWP space.
A few config file entries have been added. Please see Net::FTPServer::PWP::Server for a detailed discussion on the new entries.
$Id: PWP.pm,v 1.11 2003/04/01 15:50:41 lem Exp $
Original version; created by h2xs 1.21 with options
-ACOXcfkn Net::FTPServer::PWP -v1.00 -b 5.5.0
We can now hide the mount point from the client if instructed to do so in the configuration file.
Varios quota-related changes. See Net::FTPServer::PWP::Server for specific info.
Fixed typo in the docs that was causing POD errors.
Luis Munoz <email@example.com>, Manuel Picone <firstname.lastname@example.org>
Copyright (c) 2002, Luis Munoz and Manuel Picone