From owner-freebsd-questions@FreeBSD.ORG Thu Dec 23 03:08:05 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 A71AB1065670 for ; Thu, 23 Dec 2010 03:08:05 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3A5068FC12 for ; Thu, 23 Dec 2010 03:08:04 +0000 (UTC) Received: by fxm16 with SMTP id 16so6351390fxm.13 for ; Wed, 22 Dec 2010 19:08:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=wWv20VVS2X9uXwNyW6af6gVlwaguPKOLmwpp4or0JPo=; b=CwVVgnm2nIgptdELUT2PlT5yzrTpyyESiS6sDjqQ6cXosR4ZebGznJKx47b8MXBgZ9 rC+ck6Cvxp2MJHcdnHbjURRs2fv7tn4wzFPyrHbi04yDc3yq1GeC2gmrF3UneeidzD37 gqqa2fsCS5CaBVdkj2Tiu/m5nwihNoKxXX32c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=o/NNHJZ505ie8MuCBqkhciQ5I1Slebr32GufUGR/LVTvTC2EDzIKLeT+CvtLPFxQfw DmP1jyi1rCQKAr8ERYZJzIqeQPwZzqktEOsEPf6bgbsExdQCihDUck6CKgN+/Qj9Ankc ix0ysy16oP0T5K7B//eq2dsz01OE9IJ8SL+MI= MIME-Version: 1.0 Received: by 10.223.85.204 with SMTP id p12mr51286fal.146.1293073683869; Wed, 22 Dec 2010 19:08:03 -0800 (PST) Received: by 10.223.114.4 with HTTP; Wed, 22 Dec 2010 19:08:03 -0800 (PST) In-Reply-To: <4D12BA51.2010602@speakeasy.net> References: <4D12BA51.2010602@speakeasy.net> Date: Wed, 22 Dec 2010 21:08:03 -0600 Message-ID: From: Adam Vande More To: "Jason C. Wells" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd general questions Subject: Re: 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 03:08:05 -0000 On Wed, Dec 22, 2010 at 8:56 PM, Jason C. Wells wrote: > 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? > I think you're reinventing the wheel. The sysutils/ezjail already handles this gracefully in addition to many other features. For reference ezjail creates a layout like this: /usr/jails/www.example.com.device on /usr/jails/www.example.com (ufs, local, soft-updates) /usr/jails/basejail on /usr/jails/www.example.com/basejail (nullfs, local, read-only) devfs on /usr/jails/www.example.com/dev (devfs, local, multilabel) >From inside the jail you see: /usr/jails/www.example.com.device on / (ufs, local, soft-updates) -- Adam Vande More