USB Card Reader Permissions

Daniel O'Connor doconnor at gsoft.com.au
Tue Nov 8 14:12:08 PST 2005


On Wed, 9 Nov 2005 07:24, Andy Fraser wrote:
> I was wondering if someone could tell me how to set the permissions for a
> USB card reader when it's plugged in? I've been Googling for hours and
> found nothing concrete so far although I'll keep looking.

devfs.conf can do it.

> So far I have this situation:
> I plug in the card reader and device nodes are created
> (e.g. /dev/da0s1, /dev/da1s1 etc). I can mount this as root and if I
> manually set the permissions I can mount it as my user too. What I can't
> work out is how to change the permissions when I plug it in so I can just
> use the reader as my user.

[inchoate 8:36] ~ >cat /etc/devfs.rules
[root=100]

add path 'da*' group operator mode 660

And in rc.conf..
devfs_system_ruleset="root"

> I've read the man pages for devfs, devfs.conf and devfs.rules. devfs.rules
> looks like what I need but I can't work out what I actually need to do or
> how to test a rule without rebooting.

It isn't very obvious :(
You can test your changes by doing..
/etc/rc.d/devfs restart

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20051109/cf310f51/attachment.bin


More information about the freebsd-stable mailing list