#----------------------------------------------------------
# This is the main server configuration

[section] main

# allow connections from port 21
ftpport 21

# set maximum users to 200
maxusers 200

# log everything execpt debugging logs
logstrength 63

# set logfile
logfile /var/log/anon-ftpd.log

# set default timeout to 300 seconds
timeout 300

# set the file displayed on login
logindump /etc/issue.ftp

# allow anyhost to connect
ipacl A:*

# set admin email address
email user@hostname

# set groups to run through. one group is for users in edu domains,
# the other for normal anonymous users

group anonymous-edu
group anonymous-normal

# set scratchfile for inetd operation
scratchfile /var/lock/muddleftpd.scratch 

# set the greeting
greeting Welcome. Enter a username.

#----------------------------------------------------------
# This configures the anonymous user for edu domains
# Note: if the following doesn't work, then your computer
#       needs the ftp user to be set.

[section] anonymous-edu

	# tell the group that is can accept any user that ends in .edu or
	# with .edu. and a two letter country code

	ipacl A:(*.edu)
	ipacl A:(*.edu.??)

	# tell the server to accept any username for this group
	nameacl A:*

	# tell the server to use chroot to the anonymous rootdir
	chroot 1

	# tell the server to use the ftp user as the anonymous rootdir
	# and uid/gid
	authparams ftp

	# tell the server to use the anonymous authenticator, and
	# accept any password.
	authmethod anonymous

	# disallow any changes to file permissions or upload umask
	chmoding 0

	# print out this file when the user logs in. It is not relative
	# to anonymous's rootdir
	welcome /home/ftp/welcome.msg

	# display this file when a user changes into a new directory
	cddump .message

	# display this file when too many users are logged on
	busydump /etc/msgs/msg.toomany

	# set the umask files are uploaded with
	umask 077

	# give anonymous user read/list access everywhere and add/list access
	# to the incoming folder. The / on the end of the second directive
	# tells muddleftpd to apply ACL to a directory rather than a file.
	access /:RLC
	access /incoming/:ALC

#----------------------------------------------------------
# This configures the anonymous user or other areas. It is more
# restrictive than edu configuration
# Note: if the following doesn't work, then your computer
#       needs the ftp user to be set.

[section] anonymous-normal

	# tell the group that it can accept any host that the last group
	# didn't get
	ipacl A:*

	# tell the server to accept any username for this group
	nameacl A:*

	# tell the server to use chroot to the anonymous rootdir
	chroot 1

	# tell the server to use the ftp user as the anonymous rootdir
	# and uid/gid
	authparams ftp

	# tell the server to use the anonymous authenticator, and
	# accept any password.
	authmethod anonymous

	# disallow any changes to file permissions or upload umask
	chmoding 0

	# print out this file when the user logs in. It is not relative
	# to anonymous's rootdir
	welcome /home/ftp/welcome.msg

	# display this file when a user changes into a new directory
	cddump .message

	# display this file when too many users are logged on
	busydump /etc/msgs/msg.toomany

	# set the umask files are uploaded with
	umask 077

	# give anonymous user read/list access everywhere. No upload access
	# for non-edu anonymous users.
	access /:RLC
	
	# set this group to allow a maximum of 20 users. Keeps the server
	# free
	maxusers 20

	# for this group, have all sessions reniced to 15 so that other
	# users have more priority
	nice 15
