Subject: anonymous ls -l

From: Jeffrey Auerbach <[email-masked]>
Date: Thu, 31 Oct 1996 16:54:49 -0500 (EST)

Hello,

I am setting up an anonymous ftp server for my company.  I have it working
except for one thing that is bugging me.  WHen I do an ls -l as an
anonymous user, it lists the owner and group numbers, not their
corresponding names.  How can I fix this?  WHen i log in as myself i get
the correct ls -l listing.

One more thing, I believe that my ftpd is reading the /etc/passwd file
instead of the ~/ftp/etc/passwd file, how can i change this?

Thanks for your help

Jeff Auerbach
[email-masked]

---

From: "Garry T. Williams" <[email-masked]>
Date: Thu, 31 Oct 1996 20:07:32 -0500 (EST)

> the correct ls -l listing.

You don't have appropriate entries in your ~ftp/etc/passwd file.

> instead of the ~/ftp/etc/passwd file, how can i change this?

Well it does, except for anonymous users -- they get a chroot to ~ftp so 
that they see the ~ftp/etc/passwd.  

Garry Williams
America Net, Inc.

---

From: James Sneeringer <[email-masked]>
Date: Thu, 31 Oct 1996 21:41:37 -0600 (CST)

On Thu, 31 Oct 1996, Jeffrey Auerbach wrote:
| I am setting up an anonymous ftp server for my company.  I have it working
| except for one thing that is bugging me.  WHen I do an ls -l as an
| anonymous user, it lists the owner and group numbers, not their
| corresponding names.  How can I fix this?  WHen i log in as myself i get
| the correct ls -l listing.

Set up an ~/ftp/etc/passwd with the appropriate user-uid mappings.  The
~ftp/etc directory needs at least execute permisions, and the passwd file
needs read permissions.  You can use your /etc/passwd as a guide, but it's
a bad idea to just copy it straight over; under no circumstances should
the ~ftp/etc/passwd contain the crypt()ed passwords, that's just asking
for trouble.

| One more thing, I believe that my ftpd is reading the /etc/passwd file
| instead of the ~/ftp/etc/passwd file, how can i change this?

If it was reading your /etc/passwd, it probably wouldn't be displaying
uids instead of usernames.  It only reads /etc/passwd for real user
logins, and to see what directory to chroot() to for anonymous users.
(And maybe some other things I'm forgetting, but it does not use it for
user-uid mappings.)

-James