Subject: TAKE 2: ftpd(8) enhancements
To: None <tech-userlevel@NetBSD.ORG>
From: Luke Mewburn <>
List: tech-userlevel
Date: 05/09/1997 13:57:13
A couple of weeks ago I started a discussion on enhancing ftpd.

Here's the latest doc describing the format of /etc/ftpd.conf

Given the following definitions:

CLASS		one of: none, real, anonymous, chroot, all
FILE		filename (without directory elements)
DIRECTIVE	one of: display, notify, conversion, speed, nomodify, umask
FILEGLOB	a `glob' of FILEs

Lines in file /etc/ftpd.conf can be one of:

CLASS display FILE
	Display the contents of FILE to CLASS if it exists in the
	current directory.
	Only displayed once per directory.
	If CLASS is "none", disable display for all classes (and FILE
	is ignored)

	Notify CLASS that files matching FILEGLOB exist.
	Only displayed once per directory.
	If CLASS is "none", disable notify for all classes (and FILEGLOB 
	is ignored)

	Setup a file conversion for CLASS.
	SUFFIX is the file suffix to recognise.
	TYPE is 'd' (dirs), 'f' (files), or any combination of these.
	FILE is a file, which if exists in the current directory,
	  prevents the conversion. If `.', no file is used.
	COMMAND is the command to run. `%s' is the file to retrieve,
	  sans suffix.
	If CLASS is "none", disable conversion for SUFFIX for all classes.

CLASS speed
	Enable "site speed" for CLASS.
	If CLASS is "none", disable speed for all classes.
	"site speed xxx" limits transfers to xxx KB/s.

CLASS nomodify
	Prevent access for CLASS to the following ftpd commands:
		dele, mkd, rmd, umask, chmod
	If CLASS is "none", enable for all classes.

	Set the umask(2) for CLASS to UMASK.
	If CLASS is "none", this is ignored.

Lines that appear later in the file override those that appear earlier.

If ftpd.conf doesn't exist, ftpd will act as if "DIRECTIVE none" is set
for each value of DIRECTIVE above.

Suggested changes:
* put "user limits in"
	should be done by inetd or wrappers