From owner-freebsd-questions Fri Oct 19 5:36:24 2001 Delivered-To: freebsd-questions@freebsd.org Received: from web12307.mail.yahoo.com (web12307.mail.yahoo.com [216.136.173.105]) by hub.freebsd.org (Postfix) with SMTP id E164E37B401 for ; Fri, 19 Oct 2001 05:36:21 -0700 (PDT) Message-ID: <20011019123621.72155.qmail@web12307.mail.yahoo.com> Received: from [130.161.221.104] by web12307.mail.yahoo.com via HTTP; Fri, 19 Oct 2001 05:36:21 PDT Date: Fri, 19 Oct 2001 05:36:21 -0700 (PDT) From: Ruben de Groot Subject: pwd returns absolute path when inside jail To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, I'm not sure if this question belongs in -questions (maybe -hackers?). Anyway, here it is: I've been setting up jails on one of my machines like this: - made world with DESTDIR=/home/jailer/jail etcetera, following jail(8) - created directories /jails/jail1 ... /jails/jailx - copied /home/jailer/jail/dev, etc and var to each of the /jails/jail(x) directories - removed dev, etc, var from /home/jailer/jail After this I can start any of the jails with the following script: #!/bin/sh ifconfig fxp0 192.168.10.$1 alias mount -t null -o rdonly,union /home/jailer/jail /jails/jail$1 mount -t procfs proc /jails/jail$1/proc jail /jails/jail$i host$1 192.168.0.$1 /bin/sh /etc/rc This is working fine. I can login to any of the jails and can only see processes and files inside the jail. What I don't like is the following: %cd / %pwd / %cd /usr %pwd /usr %cd /etc %pwd /jails/jail1/etc %cd /jails/jail1/etc /jails/jail1/etc: No such file or directory. This happens also for /dev and /var, but not for the directories (like /usr, /bin ) that were union-mounted on the jail. Is this a bug? If not, can anyone explain this behaviour? Thanks. __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message