#!/bin/sh
#First however, create an account called " ftp " (using UserManager.app
# or nu). 
# Disable the account by puting an " * " as the password. 
# Give it a special home directory, such as /RestrictedAccounts/ftp
#
# THIS IS AN UNTESTED SCRIPT AS AN EXCERPT FROM AN USENET ARTICLE!
#

rm -r ~ftp/*
rm -r ~ftp/.*
chown ftp ~ftp		
chmod 555 ~ftp		
mkdir ~ftp/bin		
chown root ~ftp/bin
chmod 555 ~ftp/bin
cp -p /bin/ls ~ftp/bin
chmod 111 ~ftp/bin/ls
mkdir ~ftp/etc
chown root ~ftp/etc
chmod 555 ~ftp/etc
cp -p /etc/passwd /etc/group ~ftp/etc         
#remove unneeded information from the passwd and group files
chmod 444 ~ftp/etc/passwd ~ftp/etc/group
mkdir ~ftp/pub
chown ftp ~ftp/pub
chmod 577 ~ftp/pub
mkdir ~ftp/incoming
chmod 777 ~ftp/incoming
