[comp.sys.sgi] ftpd

tom@mims-iris.waterloo.edu (Tom Haapanen) (06/08/89)

I have been having a lot of trouble getting the 'ls' command working with
ftpd on our machine: a client calling in would get no output from an 'ls'
command at all.  After getting no useful advice from tech support, I got
the new ftp & ftpd versions from uunet, and ported the ftpd to our 4D (we're
using 3.1C).  Now, clients could use 'ls', but _not_ 'ls -l'.  I spent a
great deal of time tracing through ftp and ftpd logic, trying to figure
out why an anonymous client (real users were OK) could not exec /bin/ls.
I renamed lc to ls, and that was fine.  WHAT GIVES?

Eventually, after many attempts, replacing ls with a shell script in 
~ftp/bin, and creating my own chroot test program, I discovered what 
causes the problem: ls(1) uses a shared library!  The library is in /lib,
which is no longer accessible once you do a chroot to ~ftp.

So, the fix to the problem is to create another directory containing
the shared library that ls needs:
	~ftp:
	d--x--x--x   2 root     sys          512 Jun  7 15:28 lib

	~ftp/lib:
	-r-xr-xr-x   1 root     sys       103268 Jun  7 15:28 libc_s

This is in addition to the files and directories as described in the
man pages for ftpd(1M) in our 3.1C documentation.

Didn't anyone test ftp/ftpd before it went out the door?  Or did someone
just forget to update the manual?

					\tom haapanen
					tom@mims-iris.waterloo.edu
					watmims research group
					university of waterloo

"Now, you didn't really expect my views to agree with my employer's, did you?"

arc@SGI.COM (Andrew Cherenson) (06/14/89)

Tom Haapanen <tom@mims-iris.waterloo.edu>  writes:
>I have been having a lot of trouble getting the 'ls' command working with
>ftpd on our machine: [...] (we're using 3.1C).

This bug in anonymous ftp has been fixed in release 3.1D. For releases
3.1A-C only, it is necessary to create ~ftp/lib and copy /lib/libc_s into it.
Customer Support has known about this workaround since the bug was discovered.

If you support anonymous ftp on your IRIS-4D, please update it to 3.1D. 
An important ftpd bug has been fixed in that release.