Re: USB Card Reader Permissions
On Tue, 2005-Nov-08 20:54:41 +, Andy Fraser wrote: >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. I also found the man pages very opaque but some googling turned up a site with a tutorial (unfortunately, I didn't keep a record). -- Peter Jeremy ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: USB Card Reader Permissions
On Wednesday 09 Nov 2005 12:22 am, Daniel O'Connor wrote: > > I thought that was only for devices that exist at boot? I have my DVD > > burner set up in devfs.conf so I can use it as my user (reading and > > burning with some other tweaks[1]). > > Nope, it's applied to all devices as they are created as well as > pre-existing ones. Ah, cool. :-) > > ...and this turned out to be the missing piece in the jigsaw. > > Yeah it took me a while to find out you needed that too :) :-) > > [1] One of the reasons I first tried FreeBSD as a desktop OS was because > > it has better support for CD/DVD burning as a user than Linux does (I > > still can't get burning working reliably with Gentoo but FreeBSD works > > flawlessly). And the sound system is much better but that's another > > story. > > > > :-) > > Weird, I would expect it to be largely the same. I don't want to say too much, it being OT and all, but a change in Linux 2.6.8 has meant that I have to run my burning software as root to get a reliable burn. I've yet to find a solution to that problem. > PS another way to do this would be to create a devd file which does the > chmod's for this particular device (instead of blindly changing all da > devices). I have things working, I'm happy. :-) I'll look at other options and better set ups when I have either the need or the time. :-) -- Andy. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: USB Card Reader Permissions
On Wed, 9 Nov 2005 09:20, Andy Fraser wrote: > On Tuesday 08 Nov 2005 10:11 pm, Daniel O'Connor 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. > > I thought that was only for devices that exist at boot? I have my DVD > burner set up in devfs.conf so I can use it as my user (reading and burning > with some other tweaks[1]). Nope, it's applied to all devices as they are created as well as pre-existing ones. > ...and this turned out to be the missing piece in the jigsaw. Yeah it took me a while to find out you needed that too :) > [1] One of the reasons I first tried FreeBSD as a desktop OS was because it > has better support for CD/DVD burning as a user than Linux does (I still > can't get burning working reliably with Gentoo but FreeBSD works > flawlessly). And the sound system is much better but that's another story. > :-) Weird, I would expect it to be largely the same. PS another way to do this would be to create a devd file which does the chmod's for this particular device (instead of blindly changing all da devices). -- 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 pgpLxdfhq0wip.pgp Description: PGP signature
Re: USB Card Reader Permissions
On Tuesday 08 Nov 2005 10:11 pm, Daniel O'Connor 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. I thought that was only for devices that exist at boot? I have my DVD burner set up in devfs.conf so I can use it as my user (reading and burning with some other tweaks[1]). > > 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 I already had something like this... > And in rc.conf.. > devfs_system_ruleset="root" ...and this turned out to be the missing piece in the jigsaw. > > 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 I'd been trying that. It turns out I had completely missed the rc.conf line above so obviously restarting devfs had no effect. Many thanks Daniel. It's working just how I want it now. :-) [1] One of the reasons I first tried FreeBSD as a desktop OS was because it has better support for CD/DVD burning as a user than Linux does (I still can't get burning working reliably with Gentoo but FreeBSD works flawlessly). And the sound system is much better but that's another story. :-) -- Andy. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: USB Card Reader Permissions
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 pgpDqH757Gbj2.pgp Description: PGP signature