Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!caip!clyde!cbatt!ihnp4!houxm!hropus!jrw From: jrw@hropus.UUCP (Jim Webb) Newsgroups: net.unix-wizards Subject: Re: chroot(2) security Message-ID: <719@hropus.UUCP> Date: Thu, 9-Oct-86 12:24:40 EDT Article-I.D.: hropus.719 Posted: Thu Oct 9 12:24:40 1986 Date-Received: Fri, 10-Oct-86 03:48:43 EDT References: <158@itcatl.UUCP> <113@nonvon.UUCP> <15879@ucbvax.BERKELEY.EDU> <376@nswitgould.OZ> Organization: Bell Labs, Holmdel, NJ Lines: 10 > There is, however, one interesting feature of chroot. It doesn't change > your current working directory. Thus you can still access files relative > to the current working directory that your program had, either by chdir > before the chroot, or by inheriting from the shell. True, which is why the chroot command does a chdir() to the new root. Why, for you could still use .., right? Wrong. The kernel interprets .. in the root directory as the root directory itself, so, for an example, ls -l /.. -- Jim Webb "Out of phase--get help" ...!ihnp4!hropus!jrw