sata/ata device permission for user
Polytropon
freebsd at edvax.de
Thu Apr 18 07:51:22 UTC 2013
On Thu, 18 Apr 2013 00:32:09 -0700 (PDT), Beeblebrox wrote:
> >> The user also needs access to the corresponding pass device which is shown
> by "camcontrol devlist". He also needs access to /dev/xpt0 I think.
Correct, that matches my settings. :-)
> <HL-DT-ST DVDRAM GSA-4165B DL05> at scbus6 target 0 lun 0 (cd0,pass3)
>
> crw------- 1 root operator 0x48 Apr 18 07:08 pass0
> crw------- 1 root operator 0x49 Apr 18 07:08 pass1
> crw------- 1 root operator 0x4a Apr 18 07:08 pass2
> crw------- 1 root operator 0x4b Apr 18 07:08 pass3
> crw------- 1 root operator 0x42 Apr 18 07:08 xpt0
>
> User is member of operator group.
But the group permissions are --- (none).
> However, I agree with your idea because
> just now I was working with cdrtools and got this error, but when I ran as
> root no error:
>
> % cdda2wav summary --device /dev/cd0
> cdda2wav: Permission denied. Open of /dev/xpt0 failed. 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 should be able to see something like this:
% cdda2wav summary --device /dev/cd0
No target specified, trying to find one...
cdda2wav: Too many CD/DVD/BD-Recorder targets found.
scsibus0:
0,0,0 0) 'HL-DT-ST' 'DVDRAM GSA-H42N ' 'RL00' Removable CD-ROM
0,1,0 1) 'HL-DT-ST' 'DVD-ROM GDR8163B' '0L30' Removable CD-ROM
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
cdda2wav: Select a target from the list above and use 'cdda2wav dev=b,t,l'.
As it has been mentioned, access to xpt is also required.
It should be fine to set this via group permissions.
This is an example of possible settings:
link cd0 dvd
own cd0 root:operator
perm cd0 0660
own cd1 root:operator
perm cd1 0660
own pass0 root:operator
perm pass0 0660
own pass1 root:operator
perm pass1 0660
own xpt0 root:operator
perm xpt0 0660
See "man xpt" for details.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list