Date: Thu, 18 Apr 2013 09:51:29 +0200 From: Polytropon <freebsd@edvax.de> To: Beeblebrox <zaphod@berentweb.com> Cc: freebsd-questions@freebsd.org Subject: Re: sata/ata device permission for user Message-ID: <20130418095129.7c6dc564.freebsd@edvax.de> In-Reply-To: <1366270329916-5804740.post@n5.nabble.com> References: <1365927098231-5803691.post@n5.nabble.com> <20130414103154.3a49e6de.freebsd@edvax.de> <1365996890840-5803879.post@n5.nabble.com> <1366004997052-5803900.post@n5.nabble.com> <516F9DD2.6030200@coosemans.org> <1366270329916-5804740.post@n5.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130418095129.7c6dc564.freebsd>
