Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2007 13:53:32 -0700
From:      "Darren Spruell" <phatbuckett@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Set perms on attach of USB umass disk
Message-ID:  <839aec700711011353x109b4ec6jaa3988160052849f@mail.gmail.com>
In-Reply-To: <20071101192953.GA65305@slackbox.xs4all.nl>
References:  <839aec700711011053i3b4d7c7dmbbd5afde03ba513a@mail.gmail.com> <20071101192953.GA65305@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
> > I've tried altering devfs.conf but this appears to only work for
> > devices that are attached at startup of devfs.
> [snip]
>
> As a matter of fact, this is documented in the devfs.conf manual page.
> This will also tell you where to look;

Yep:

"It does not work for devices plugged in and out after the system is up
and running, e.g. USB devices.  See devfs.rules(5) for setting ownership
and permissions for all device nodes, and usbd.conf(5) for actions to be
taken when USB devices are attached or detached."

I overlooked that for some reason. :(

> create a new file /etc/devfs.rules with contents
>
> [system=10]
> add path 'da*' mode 660 group operator
>
> Then in /etc/rc.conf add
> devfs_system_ruleset="system"
> and restart devfs (/etc/rc.d/devfs restart)

Works great, thanks.

-- 
Darren Spruell
phatbuckett@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?839aec700711011353x109b4ec6jaa3988160052849f>