Subject: dumb question: chroot

From: "D. Carlos Knowlton" <[email-masked]>
Date: Thu, 4 Mar 1999 11:00:17 -0600

Forgive my naiveté, but could someone please refresh my memeory on the
syntax for "chroot"?  I can't find a man page for it, so any help here would
be great!

Thanks!

-ck

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 4 Mar 1999 12:47:50 -0500 (EST)

On Thu, 4 Mar 1999, D. Carlos Knowlton wrote:

> syntax for "chroot"?  I can't find a man page for it, so any help here
> would be great!

chroot directory program [ arg ... ]

There's an example in the FAQ. Here's how I do it to test 'ls':

su -c 'cd ~ftp ; env - /usr/sbin/chroot ~ftp /bin/ls -al'

This runs in as root (su -c '...') a clean environment (env -).  Because
it's root, it won't spot file/directory permission problems.  Also,
because the cd happens before the chroot, the '..' entry will be for the
wrong inode.  Bearinall this in mind, the command will catch most problems
for programs in the FTP area.

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195