On 12/06/11 16:12, Devin Teske wrote:
-----Original Message-----
From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
questi...@freebsd.org] On Behalf Of Arthur Chance
Sent: Tuesday, December 06, 2011 3:47 AM
To: Ronald F. Guilmette
Cc: freebsd-questions@freebsd.org
Subject: Re: drivin' me nuts: permissions and cdda2wav
On 12/06/11 11:22, Ronald F. Guilmette wrote:
With a pre-recorded CD in the drive, the following works fine for me
when I'm root:
cdda2wav -D 0,0,0 -B
My question is: What do I need to do in order to make this work also
when executed from a non-root account?
Here's what I get when I try to do the above from a non-root account:
cdda2wav: Permission denied. Cannot open or use SCSI driver.
cdda2wav: For possible targets try 'cdda2wav -scanbus'. Make sure you are
root.
Probably you did not define your SCSI device.
Set the CDDA_DEVICE environment variable or use the -D option.
You can also define the default device in the Makefile.
For possible transport specifiers try 'cdda2wav dev=help'.
Effing hell! I've tried just about everything I can think of off the
top of my head to beat this and nothing works. I've tried chmod 0660
/dev/pass* (and yes, the account I'm trying these experiments from
_is_ a member of the `operator' group), but that didn't help a bit.
And before anybody asks, let me say that yes, I _do_ have:
atapicam_load="YES"
in my /boot/loader.conf file.
So how exactly does one adjust the permissions on one of these
atamicam pseudo-SCSI devices. Where are they underneath /dev ?
Please excuse my ignorance, but I just don't know.
<<gnashing of teeth sound>>
I've just been through the same experience getting cdparanoia to work for a
non-
root user under REL 8.2p4. Note that I have the ahci module loaded so my cd is
/dev/cd0.
You need write access to /dev/cd0 plus the corresponding /dev/passN (use
camcontrol devlist to find out which) *and* /dev/xpt0.
From my /etc/devfs.conf
own cd0 root:operator
perm cd0 0660
link cd0 cdrom
perm xpt0 0660
perm pass5 0660
An alternative approach would be to create files in /etc/devd
For example, creating the configuration file "/etc/devd/mydevice.conf" with the
following contents:
notify 100 {
match "system" "DEVFS";
match "subsystem" "CDEV";
match "cdev" "pass[0-9]";
match "type" "CREATE";
action "/bin/chmod 666 /dev/$cdev";
};
Will cause the system to execute the associated-action whenever /dev/pass[0-9]
is created in realtime by devd.
A really cute way to log devfs activity is to create /etc/devd/logger.conf with
these contents:
notify 100 {
action "logger DEVD ACTIVITY LOGGER";
action "logger bus == $bus";
action "logger cdev == $cdev";
action "logger cisproduct == $cisproduct";
action "logger cisvendor == $cisvendor";
action "logger class == $class";
action "logger device == $device";
action "logger devclass == $devclass";
action "logger device-name == $device-name";
action "logger endpoints == $endpoints";
action "logger function == $function";
action "logger interface == $interface";
action "logger intclass == $intclass";
action "logger intprotocol == $intprotocol";
action "logger intsubclass == $intsubclass";
action "logger manufacturer == $manufacturer";
action "logger mode == $mode";
action "logger notify == $notify";
action "logger parent == $parent";
action "logger port == $port";
action "logger product == $product";
action "logger release == $release";
action "logger serial == $serial";
action "logger slot == $slot";
action "logger subvendor == $subvendor";
action "logger subdevice == $subdevice";
action "logger subsystem == $subsystem";
action "logger system == $system";
action "logger type == $type";
action "logger vendor == $vendor";
};
Once the above file is installed, just bounce the devd process and now whenever
a device is created or destroyed (for example, when performing "camcontrol
rescan all" or plugging/un-plugging USB devices), /var/log/messages will show
you all the criteria that you can match-against for your given device.
Excellent as a general purpose diagnostic for pluggable devices, but for
a CD drive that's permanently wired to a SATA port and has its SCSI
address fixed by device hints like mine it's rather overkill.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"