anon-ftp -- static ls(1) replacement?

anon-ftp -- static ls(1) replacement?

Post by Dallas N Antl » Mon, 25 Mar 1996 04:00:00

I'm trying to build an anonymous ftp space that does not require me to
mount the partition suid (apparently due to 'nodevs' being implicitly
stated by 'nosuid').  If I use a dynamically-linked ls binary, then
/dev/zero is required.

I've tried to build a static version of GNU "ls" (GNU fileutils 3.12)
using gcc (2.7.2) as my C compiler with either '-static' or
'-Wl,-Bstatic'.  Of course, linking fails noting that libc.a is unable
to locate "dlopen" and friends.

Any ideas?  From reading Casper's reply regarding "static" tcsh, I
know that I can't link a program that uses getpwXX staticly. Has
anyone written a simple "replacement" for ls(1) that _can_ be static?
I don't care if it doesn't use /etc/{passwd,group}.

Please reply via email.  If there's interest (and a simple solution),
I'll submit it to the FAQ.

Thank you for your time.
                                Dallas Antley

"When you build great technologies, the support comes naturally."
                                                --SunSoft, '93


1. Why can't I do a ls in anon-ftp??


I have battled with getting anonymous ftp to run.

I have the directory structure setup exactly as described for anon-ftp.  I
have watered down copies of /etc/passwd and /etc/group in the ~ftp/etc
directory.  Here is the directory structure of ~ftp:

d--x--x--x    2 root     root             1024 Jan  6 21:05 bin
d--x--x--x    2 root     root             1024 Jan  6 20:19 etc
drwxr-xr-x   3 root     testgroup     1024 Jan  6 20:42 pub

I have copied /bin/ls to ~ftp/bin.  I get logged in fine but whenever I
issue an "ls" command it says:

ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.

Thats all I get.  Since I know the directory structure (I set it up) I can
change around just fine.  I just cannot ever get a listing of directories
and files.  I have the appropriate permissions on the files and directories
also.  If I remove ls from ~ftp/bin it still results the same.  Is there
possibly a library that is need with the ls command??

I am using wu-ftpd 2.4.2 wu-ftpd on RedHat Linux 4.2 with a 2.0.30 kernel.

Please help!  It is much appreciated.

Thanks in advance.

Cory Cipra

2. How can use linux? debates

3. How do I make a statically linked version of ls (for anon ftp)

4. NIS,yp, can't login

5. wu_ftpd anon ftp user can't ls -l or use ncftp

6. Redhat 6.1 and Exceed 6.2 w/ XDMCP

7. anon ftp problems (no ls info

8. Kernel Panic in Slackware.

9. Anon FTP doing ls - "impossibly"

10. ls broken for anon ftp on wu-ftpd

11. Anon ftp and ls, nothing is listed ?

12. ls doesn't work with anon ftp...

13. Anon ftp connect - but no ls...