Anonymous FTP on SUN (v8n

Tony Tran na!tran at xlnvax.excelan.com
Sun Dec 3 07:56:10 AEST 1989


Crawford Macnab <tjcm at stl.stc.co.uk> in v8n204 asked:

>Does anyone know what further steps I must take to allow users to log in
>to ftp and browse through the files I am exporting using the 'ls' command.
>Is their a version of 'ls' somewhere in the SunOS filesystem which is not
>dynamically linked ?!

Basically, anonymous ftp chroots to ~ftp and uses the bin, etc directories
under the new root.  SunOS 4.x's "ls" was dynamically linked, which
requires ld.so in /usr/lib (~ftp/usr/lib/ld.so). This is to prevent
anonymous ftp's from being able to browse your entire filesystem.

There are 3 solutions to fix this problem:

1. If you have access to source, either Sun or 4.3 BSD, get the source for
"ls" and recompile it, being sure to link it with "-Bstatic".  The result
won't need the shared library and can be placed in ftp's bin directory.
{no dynamic linking}

2. Copy the /usr/lib/ld.so to ~ftp/usr/lib/ld.so This library alone will
NOT work. It also needs libc.so.1.[1|2|3] plus ~ftp/dev/zero for it to
work. {cd to ~ftp/dev and mknod zero c 3 12}

3. Copy the "ls" executable from a SUN OS 3.x machine and use that.

SUNOS 3.x doesn't have dynamic linking so you should not run into this
problem.

William LeFebvre also had a long article about anonymous FTP published in
The Sun Observer in the July issue.

Tony Tran
Novell San Jose
Internet: tran at na.excelan.COM 
UUCP: 	  {ames,sun,apple,amdahl}!excelan!tran  



More information about the Comp.sys.sun mailing list