Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!rice!sun-spots-request From: na!tran@xlnvax.excelan.com (Tony Tran) Newsgroups: comp.sys.sun Subject: Re: Anonymous FTP on SUN (v8n Keywords: Miscellaneous Message-ID: <3804@brazos.Rice.edu> Date: 2 Dec 89 20:56:10 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 35 Approved: Sun-Spots@rice.edu X-Refs: Original: v8n204, Replies: v8n213 X-Sun-Spots-Digest: Volume 8, Issue 218, message 1 of 15 Crawford Macnab 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@na.excelan.COM UUCP: {ames,sun,apple,amdahl}!excelan!tran