Installing and Administering Internet Services

Chapter 2 49
Installing and Configuring Internet Services
Configuring Anonymous ftp Access
2. Create the subdirectory /usr/bin under the ftp home directory:
cd /home/ftp
mkdir usr
cd usr
mkdir bin
3. Copy the ls and pwd commands from /sbin to ˜ftp/usr/bin, and
set the permissions on the commands to 0111 (executable only):
cp /sbin/ls /home/ftp/usr/bin
cp /sbin/pwd /home/ftp/usr/bin
chmod 0111 /home/ftp/usr/bin/ls
chmod 0111 /home/ftp/usr/bin/pwd
4. Set the owner of the ˜ftp/usr/bin and ˜ftp/usr directories to
root, and set the permissions to 0555 (not writeable):
chown root /home/ftp/usr/bin
chmod 0555 /home/ftp/usr/bin
chown root /home/ftp/usr
chmod 0555 /home/ftp/usr
5. Create the subdirectory etc under the ftp home directory:
cd /home/ftp
mkdir etc
6. Copy /etc/passwd and /etc/group to ˜ftp/etc. These files are
required by the ls command, to display the owners of files and
directories under ˜ftp.
cp /etc/passwd /home/ftp/etc
cp /etc/group /home/ftp/etc
7. Replace the password field in all entries in /home/ftp/etc/passwd
with *, and delete the shell field from the end of each entry:
ftp:*:500:guest:anonymous ftp:/home/ftp:
acb:*:8996:20::/home/acb:
8. Replace the password field in all entries in /home/ftp/etc/group
with *:
users:*:20:acb
guest:*:21:ftp
9. Set the owner of the files in ˜ftp/etc to root, and set the
permissions to 0444 (read only):
chown root /home/ftp/etc/passwd
chmod 0444 /home/ftp/etc/passwd
chown root /home/ftp/etc/group
chmod 0444 /home/ftp/etc/group
10.Set the owner of ˜ftp/etc to root, and set the permissions to 0555
(not writeable):