From owner-freebsd-questions@FreeBSD.ORG Sun Oct 16 06:23:20 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D682A16A41F for ; Sun, 16 Oct 2005 06:23:20 +0000 (GMT) (envelope-from malcolm.kay@internode.on.net) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4907D43D46 for ; Sun, 16 Oct 2005 06:23:20 +0000 (GMT) (envelope-from malcolm.kay@internode.on.net) Received: from alpha.home (ppp212-107.lns1.adl2.internode.on.net [203.122.212.107]) by smtp3.adl2.internode.on.net (8.12.9/8.12.6) with ESMTP id j9G6NIcJ034213 for ; Sun, 16 Oct 2005 15:53:19 +0930 (CST) (envelope-from malcolm.kay@internode.on.net) From: Malcolm Kay Organization: at home To: freebsd-questions@freebsd.org Date: Sun, 16 Oct 2005 15:54:23 +0930 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510161554.23406.malcolm.kay@internode.on.net> Subject: Flash drive device name difficulties. 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: Sun, 16 Oct 2005 06:23:21 -0000 I am running FreeBSD 5.4 RELEASE. I recently aquired a 256M USB flash drive which the system recognises when plugged in; and I can mount and use it -- all working well. But now I'd like to make it available to a user or group of users through mtools. To do this I need to change the permissions on /dev/da0s1 where the flash drive msdos partition appears. This I can make happen automatically using /etc/usbd.conf by adding the lines: device "RunDisk" vendor 0x0ef5 product 0x2366 attach "sleep 1; /bin/chmod g+rw /dev/da[0-9]*" giving members of the operator group access. But this changes permissions on all "da[0-9]" devices. I know the man pages suggest ${DEVICENAME} to obtain the particular device but this doesn't work here because usbd sees the device as "umass0" which doesn't appear in /dev/*. For the moment this is the only device I have appearing in the "da*" group so the problem is not immediate/urgent. But is there some way I can extract the specific "da*" device name to use in the attach statement or is there some way I can make the flash drive always pop up at a specific da name. I've also taken a look at devd.conf but the documentation here seems somewhat sparse. You consideration is appreciated, Malcolm Kay