From owner-freebsd-current@FreeBSD.ORG Wed Apr 14 13:33:19 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3214D16A4CE for ; Wed, 14 Apr 2004 13:33:19 -0700 (PDT) Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2181743D60 for ; Wed, 14 Apr 2004 13:33:19 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from salty.rapid.stbernard.com (unknown [198.147.128.71]) by smtp-relay.omnis.com (Postfix) with ESMTP id 617DEFCFBA; Wed, 14 Apr 2004 13:33:17 -0700 (PDT) From: Wes Peters Organization: Softweyr.com To: masta Date: Wed, 14 Apr 2004 13:35:05 -0700 User-Agent: KMail/1.5.4 References: <200403112047.43739.wes@softweyr.com> <407B0EA5.7040800@linuxpowered.com> In-Reply-To: <407B0EA5.7040800@linuxpowered.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404141335.05322.wes@softweyr.com> X-Mailman-Approved-At: Thu, 15 Apr 2004 05:13:22 -0700 cc: current@freebsd.org Subject: Re: /etc/rc.d/ramdisk script for review X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2004 20:33:19 -0000 On Monday 12 April 2004 02:48 pm, masta wrote: > Wes Peters wrote: > >A question came up on the mimedefang-users mailing list today. One > >user who has recently converted from 4.8 to 5.2.1 was lamenting the > >fact there is no way to control ownership and permission of memory > >disks in 5.x. The MIMEdefang spool area, often placed on a ramdisk > >for speed, needs to be owned by the MIMEdefang user and group. > > > >I poked around at mdmfs, aka mount_mfs, and thought there should be > >a more 5.x-ish way to create ramdisks early enough in the boot process > >to just put them in /etc/fstab directly. Here's what I came up with. > > I like the notion of having rc.conf nobs to do this stuff with, but we > can already use /etc/fstab to configure a ramdisk as such: > > md /tmp mfs > rw,-s3m 0 0 > md /var mfs > rw,-s7m 0 0 > > That is how I engineered wifibsd prior to the changes Brooks did to the > diskless script of Matt's. It would seem to me that we > could have the ownership options next to the "rw,-s7m" options fields > which already exists. Something like "rw,-s7m,-Owes:staff", or similare. > > Since mount_md, or mdmfs, or whatever mount uses to do the task, could > be changed to facilitate that one needful thing or using chown/chgrp, > right? No, because it can't change the ownership of the mount point after the mount, which is the point of the whole thing. If you recall from the original message, this was to create a temporary space for MIMEdefang, which runs as an untrusted user and so needs the ownership set appropriately. We use the same mechanism for virus scanning as well. -- "Where am I, and what am I doing in this handbasket?" Wes Peters wes@softweyr.com