From owner-freebsd-questions@FreeBSD.ORG Mon Sep 22 07:23:56 2008 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 7FD95106564A for ; Mon, 22 Sep 2008 07:23:56 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6CAAB8FC13 for ; Mon, 22 Sep 2008 07:23:54 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.2/8.14.2) with ESMTP id m8M7NnCG017906; Mon, 22 Sep 2008 09:23:49 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.2/8.14.2/Submit) with ESMTP id m8M7N8BJ017891; Mon, 22 Sep 2008 09:23:09 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 22 Sep 2008 09:23:08 +0200 (CEST) From: Wojciech Puchar To: Matt Fioravante In-Reply-To: <3eca10930809212301t207b6d08p26eb27294350227a@mail.gmail.com> Message-ID: <20080922092148.Q17880@wojtek.tensor.gdynia.pl> References: <3eca10930809212301t207b6d08p26eb27294350227a@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-questions@freebsd.org Subject: Re: Shared /usr in jails 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: Mon, 22 Sep 2008 07:23:56 -0000 > I want to implement a number of jails for different services on a single > box. > > Since /usr is the same everywhere I'd like to just mount one copy of it > read-only to all the jails and then have them each have their own /usr/local well - i already do this, but both /usr and /usr/local are common simply install in /usr/local everything all jail users needs. > Someone recommended keeping the main system's /usr separate. This would mean > building a /usr for the main system and then making a copy of it > to be shared by the jails. > > Aesthetics and philosophy aside, are there any real security holes in just > using the systems /usr everywhere if it is mounted read only in the jails? no it works fine AND saves memory, all binaries are shared use mount_nullfs -o readonly for this. link /usr/local/etc to for example /etc/local so configs can be different in every jail