Subject: ls not listing owner/group names when chroot'ed

From: Mattias Axelsson <[email-masked]>
Date: Mon, 09 Aug 1999 12:01:46 +0200

This is the probably the same problem that Michael St. Laurent asked
about 30 jun on this mailing list, but I couldn't find the solution to
the problem in the archives.

I would like guest users (I don't have anonymous access) to only be able
to access the /foo/ftp directory so I entered the following in my
/etc/wu-ftpd/ftpaccess:

  restricted-gid ftp nogroup

and setting their home directory in /etc/passwd to /foo/ftp

This works but it would be much safer to use a chroot'ed enviroment,
which means replacing the line above in ftpaccess with the following:

  guestgroup ftp nogroup
  guest-root /foo/ftp

and setting up /foo/ftp/{etc,bin,lib} correctly.
This works fine, except that uid/gid isn't decoded to real names.
I have set up the passwd and group files correctly, even tried with
copies of /etc/passwd and /etc/group and altered the users home
directory entry. In the bin directory I have a dynamically linked ls and
my Linux system says (using ldd) that the only libraries needed in lib
are libc.so.6 and ld-linux.so.2 (with the correct local symlinks, of
course). I have even tried to copy the complete /lib directory to
/foo/ftp/lib.
Still ls -l won't translate the uid/gid numbers to names.

Mattias Axelsson
Lund Institute of Technology, Sweden

---

From: Gregory A Lundberg <[email-masked]>
Date: Mon, 9 Aug 1999 13:24:15 -0400

> Still ls -l won't translate the uid/gid numbers to names.

The problem with your second attempt is an incomplete setup (no passwd or
group file to map the numbers to names).  See the FAQ and the Guest HOWTO.

I'd use BOTH methods.  chroot people to a common point then restrict them
to their homes.  That way I only need one copy of the glue stuff needed for
chroot and I still keep them separate.

The location of the latest version of wu-ftpd can be found in the 
directory
 
      ftp://ftp.wu-ftpd.org/pub/wu-ftpd/
 
wu-ftpd Resource Center:  http://www.landfield.com/wu-ftpd/
wu-ftpd FAQ:              http://www.cetis.hvu.nl/~koos/wu-ftpd-faq.html
wu-ftpd list archive:     http://www.landfield.com/wu-ftpd/mail-archive/

-- 

Gregory A Lundberg              WU-FTPD Development Group
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195