From owner-freebsd-questions@FreeBSD.ORG Thu Dec 23 02:56:18 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70F0A106566B for ; Thu, 23 Dec 2010 02:56:18 +0000 (UTC) (envelope-from jcw@speakeasy.net) Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.52]) by mx1.freebsd.org (Postfix) with ESMTP id 5027F8FC13 for ; Thu, 23 Dec 2010 02:56:18 +0000 (UTC) Received: (qmail 18773 invoked from network); 23 Dec 2010 02:56:17 -0000 Received: from dsl081-163-120.sea1.dsl.speakeasy.net (HELO w16.stradamotorsports.com) (jcw@[64.81.163.120]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 23 Dec 2010 02:56:17 -0000 Message-ID: <4D12BA51.2010602@speakeasy.net> Date: Wed, 22 Dec 2010 18:56:17 -0800 From: "Jason C. Wells" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100808 Lightning/1.0b1 Thunderbird/3.0.5 MIME-Version: 1.0 To: freebsd general questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Nullfs Allows Jailbreaking X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2010 02:56:18 -0000 Here is my file system scheme for a newly created jail as viewed from the host: /usr/jail/template on /usr/jail/f1 (nullfs, local, read-only) /usr/jail/f1-fs/etc on /usr/jail/f1/etc (nullfs, local) /usr/jail/f1-fs/tmp on /usr/jail/f1/tmp (nullfs, local) /usr/jail/f1-fs/var on /usr/jail/f1/var (nullfs, local) /usr/jail/f1-fs/usr-local on /usr/jail/f1/usr/local (nullfs, local) As viewed from the jail: /usr/jail/template on / (nullfs, local, read-only) I like the idea of using a template for multiple jails that I plan to use later. I like the ide of mounting the template read only. I had to splice in the other nullfs filesystems so that things that need to be read-write can be. But it seems kinda funky. Inside the jail it looks like EVERYTHING is read-only and you have no way of knowing that /tmp is actually read-write. There seems to be a violation of the segregation going on here. What pitfalls can you see in a file system scheme like this for my jails? Is the above behavior by design or did I find a flaw? Thanks, Jason