From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 5 21:56:33 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1BD716A420 for ; Sun, 5 Feb 2006 21:56:33 +0000 (GMT) (envelope-from roth@droopy.unibe.ch) Received: from mailhub03.unibe.ch (mailhub03.unibe.ch [130.92.9.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68F5E43D4C for ; Sun, 5 Feb 2006 21:56:32 +0000 (GMT) (envelope-from roth@droopy.unibe.ch) Received: from localhost (scanhub02-eth0.unibe.ch [130.92.254.66]) by mailhub03.unibe.ch (Postfix) with ESMTP id E8DBA293B6 for ; Sun, 5 Feb 2006 22:56:30 +0100 (CET) Received: from mailhub03.unibe.ch ([130.92.9.70]) by localhost (scanhub02.unibe.ch [130.92.254.66]) (amavisd-new, port 10024) with LMTP id 15805-06-29 for ; Sun, 5 Feb 2006 22:56:29 +0100 (CET) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub03.unibe.ch (Postfix) with ESMTP id EFFB729455 for ; Sun, 5 Feb 2006 22:56:28 +0100 (CET) Received: from droopy.unibe.ch (droopy [130.92.64.20]) by asterix.unibe.ch (8.12.10+Sun/8.12.10) with ESMTP id k15LuT8Z014566 for ; Sun, 5 Feb 2006 22:56:29 +0100 (MET) Received: (from roth@localhost) by droopy.unibe.ch (8.12.10+Sun/8.12.9/Submit) id k15LuSqo026388 for freebsd-hackers@freebsd.org; Sun, 5 Feb 2006 22:56:28 +0100 (MET) Date: Sun, 5 Feb 2006 22:56:28 +0100 From: Tobias Roth To: freebsd-hackers@freebsd.org Message-ID: <20060205215628.GC26342@droopy.unibe.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-message-flag: Warning! Using Outlook is insecure and promotes virus distribution. Please use a different email client. X-Virus-checked: by University of Berne Subject: md access permissions during early boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2006 21:56:34 -0000 I am working on an rc.d/ script that creates a memory file-backed memory disk via mdconfig (the file exists already and contains a valid ffs). After md creation, the device is checked with fsck_ffs -p. However, fsck fails with the error NO WRITE ACCESS. The file permissions of the md device under /dev/ are 640, which should not prevent access. The same is true for the file itself, and the path to it. I tried passing the -o noreadonly option to mdconfig, but that didn't result in any different behaviour. My script is running right after the fsck script itself. When I run it from the command line after successful boot and login, fsck does not fail, so somewhere between the early beginning of the rc.d/ sequence (right after fsck is run) and login, something changes which results in root having access to my md. Any ideas what that could be? Another hint is that some time around 5.3, this was not the default behaviour, fsck was possible back then. I am using 6.0 stable now. thanks, Tobias