Subject: Debuggin wu-ftpd permissions...

From: [email-masked] (Tom Lojewski)
Date: Thu, 23 Mar 1995 11:11:39 -0800 (PST)

Dear FTPD Administrator:

One way to verify that the "anonymous" and "guest" permissions for,
/dev, /usr/lib, /etc /home/directory etc. are setup correctly is do
the following:

Make a first pass at setting up the above directories.

Assuming your target chroot directory is /FTP:

Make a *temporary* entry in the /FTP/etc/passwd (and /FTP/etc/shadow if
necessary) file(s) for the user in question (probably ftp) that
gives him the shell /bin/sh.

Put (*temporarily*) a copy of "sh" and "su" in /FTP/bin/ directory.

Then as root you can issue the command:

	chroot /FTP /bin/su - ftp

If "su" compalains that it needs another shared library, *temporarily*
copy that libarary into /usr/lib and try again.

This should give you a shell (as ftp) in the new chroot()'ed directory
"/FTP".  

Now you can verify that commands like "ls -l" work correctly.  You can
also try to create files, "cd" to various locations, try to read and
write in those directories etc. This allows you to see, interactively,
if you have installed all the correct shared libraries.  Any
complaints encountered are written to stdout - so you can see what the
problem is.  Also you can tell where you can and can't read and write.

A nice side effect of this is that you can get an idea of what kind of
damage can be done by the account should THE WORST happen and he
figures out a way to get a shell on your machine.

Don't forget to undo all the *temporary* things you did to set this
all up.

--------------------------------------------------------------------------
Tom Lojewski  -  ACUSON Corp  -  Mountain View, CA - ([email-masked])