Subject: [214] anonymous ftp and Fetch (a Mac ftp client)

From: Rob Tanner <[email-masked]>
Date: Wed, 27 Jul 1994 16:53:47 -0700

Here's a really wierd one (or at least I think it's really wierd).  I
can connect to my ftp server with Fetch and go in a a regular users
(real id and passwd), and everything is fine.  Go in as anonymous, and
directories don't list.  According to the Fetch logs, a connection for
/bin/ls was established, and according to wu-ftpd's logs (temporarily
running it in debug mode with -d), everything's okay.  But nothing
displays.  I can, however, download a file since I can do CWDs and
RETRs.

Anybody got a clue?

Thanks,
Rob

      _ _ _ _           _    _ _ _ _ _  
     /\_\_\_\_\        /\_\ /\_\_\_\_\_\  
    /\/_/_/_/_/       /\/_/ \/_/_/_/_/_/  Robert J. Tanner
   /\/_/__\/_/ __    /\/_/    /\/_/       Ames Research Center
  /\/_/_/_/_/ /\_\  /\/_/    /\/_/        (415) 604-3451 (SETI)
 /\/_/ \/_/  /\/_/_/\/_/    /\/_/         (415) 604-5347 (Kuiper)
 \/_/  \/_/  \/_/_/_/_/     \/_/          [email-masked]
 ____________________________________________________________________

---

From: Kris Lappala <[email-masked]>
Date: Wed, 27 Jul 1994 21:42:55 -0500 (CDT)

> displays.  I can, however, download a file since I can do CWDs and
THANK GOD!  Someone else is having this problem too.  (No offense intended)
I have narrowed the problem down to this:  for some reason fetch needs the
"dir" command which is the equivalent to "ls -al" to list the directories.
I am assuming that you are running Solaris, because dir is a part of SunOS only.

The way I have it figured, since normal users can use ls -al, and the anonymous
ftp user cannot, there must be a library that the anonymous ftp user cannot
find when trying to execute ls -al.  I have tried a bunch of libraries to
~ftp/usr/lib but haven't found the one yet.  If collectively this mail 
group can solve this problem it will indeed be an accomplishment, or at 
least it will get the people in my office off my back about this. :-)

-- 
Kris Lappala
[email-masked]

---

From: "That Whispering Wolf..." <[email-masked]>
Date: Wed, 27 Jul 1994 23:05:41 -0400

> least it will get the people in my office off my back about this. :-)

Even though this one has been answered a LOT of times, I'm sending a note 
about it because there's one problem that many people fail to mention as a 
possible problem with this.

First, you must have an ~ftp/usr/lib directory -- Mine looks like this:

dr-xr-xr-x  2 ftp           512 Apr 15 11:30 .
d--x--x--x  3 root          512 Mar 15 21:43 ..
-r-xr-xr-x  1 root        49152 Mar 15 21:43 ld.so
-r-xr-xr-x  1 root         7996 Mar 15 21:43 libc.sa.1.8
-r-xr-xr-x  1 root         8478 Mar 15 21:43 libc.sa.1.8.1
-r-xr-xr-x  1 root       516096 Mar 15 21:43 libc.so.1.8
-r-xr-xr-x  1 root       548864 Mar 15 21:43 libc.so.1.8.1
-r-xr-xr-x  1 root        24576 Mar 15 21:43 libdl.so.1.0

I had this much (plus ~ftp/bin/ls, of course) installed on a system at one
point in time, and ls STILL did not work. After about two hours of angsting,
I found the problem.

ls -also- requres ~ftp/dev/zero. On the system I couldn't get to work, I'd 
simply tar'd up my config here and untar'd it there, and for some reason the
device node didn't come across propperly.

My /dev directory looks like this:

d--x--x--x  2 root          512 Mar 15 21:46 .
drwxr-xr-x  8 root          512 Jul 26 16:53 ..
crw-rw-rw-  1 ftp        3,  12 Apr 15 10:57 zero

You can make the zero node with the command:

mknod ~ftp/dev/zero c 3 12

Once that is all done (bin directory, /usr/lib directory, and /dev directory),
I'll bet it'll work.

									-WW

---

From: Rob Tanner <[email-masked]>
Date: Wed, 27 Jul 1994 20:16:39 -0700

>I am assuming that you are running Solaris, because dir is a part of SunOS onl
y.

Afraid it's SunOS 4.1.2.  Also, I don't understand what difference it
makes between OSs since the ftp daemon is wu-ftpd, and not a Sun
daemon, and Fetch is a Macintosh program.  Am I missing something
blatantly obvious -- wouldn't be the first time today  :-)

>least it will get the people in my office off my back about this. :-)

Right towards the end of the day and I had another meeting to run off
to, I logged onto one of the standard ftp archives whose address comes
in the address book (right term??) that comes with Fetch.  I think it
was Dartmouth.  Anyway, the banner claimed it was wu-ftpd, and I did
see directories.  Anybody know how they do it.

-- Rob

---

From: Jeff Blaine <[email-masked]>
Date: Wed, 27 Jul 1994 23:42:20 -0400

>device node didn't come across propperly.

I'm amazed tar did not barf on you at tar file creation time when it hit
/dev/zero from the old directory.  tar will normally barf (loop?) when it
hits /dev/zero.

>crw-rw-rw-  1 ftp        3,  12 Apr 15 10:57 zero

1.  It shouldn't be owned by ftp, should be owned by root
2.  It should not be writable by anyone other than the user (root)
(I could anonymous ftp to ftp.lupine.org right now and do a ``del /dev/zero''
 and more than likely wipe it out)

crw-r--r--  1 root     somegrp     3,  12 May 13 22:12 zero

---

From: "That Whispering Wolf..." <[email-masked]>
Date: Thu, 28 Jul 1994 00:24:50 -0400

> /dev/zero from the old directory.  tar will normally barf (loop?) when it

I've never had tar had a problem on device nodes, honestly. (At least, I
can't remember it). I think the problem I ran across was I think I put the
archive together with gnutar and took it apart with tar. (I've had simular
strangeness happen under simular circuimstances before).

> 1.  It shouldn't be owned by ftp, should be owned by root

Very true. I think that one got munged a few months back and I never 
noticed.

> 2.  It should not be writable by anyone other than the user (root)

SUN ships 4.1.3 with /dev/zero set mode 666 (word writable/readable). I never
saw a reason to change it.

>  and more than likely wipe it out)

Well, I've turned off delete in my server, so not likely. :) You're right 
about setting the owner, I don't think permissions really matter, as long as
it's not in a directory that's writable by a user (then it can be deleted).

Wow, amazing how we can get off topic. 

	:)

									-WW