Re: atapicam(4) as KLD?

From: Vladimir Grebenschikov <vova_at_fbsd.ru>
Date: Fri, 15 Oct 2004 16:39:25 +0400
÷ ÐÔ, 15/10/2004 × 13:55 +0200, Michael Nottebrock ÐÉÛÅÔ:
> On Friday 15 October 2004 12:06, Peter Jeremy wrote:
> 
> > Whilst we're discussing ATAPICAM, even after I make /dev/cd0[ac] mode
> > 666, I can't write to it as a non-root user.  Does anyone know the
> > rationale for this and which particular EPERM is the culprit? 
> 
> Stuff goes through the whole cam device chain if you're using the cd* devices, 
> so you'll have to adjust permissions for the corresponding xpt* and pass* 
> devices just like you would with scsi drives.
> 
> Example devfs.conf snippet (this is suitable for members of group operator):
> 
> # Allow cdrom user access
> perm    cd0     0660
> perm    cd1     0660
> perm cd2 0660
> 
> # Allow SCSI passthrough/transport user access
> perm    xpt0    0660
> perm    xpt1    0660
> perm    xpt2    0660
> perm    pass0   0660
> perm    pass1   0660
> perm    pass2   0660

I think it is better to use devfs rulesets:

% cat /etc/devfs.rules
[devfsrules_common=7]
add path 'acd*'  mode 660 group operator
add path 'cd*'   mode 660 group operator
add path 'pass*' mode 660 group operator
add path 'xpt*'  mode 660 group operator
% fgrep devfs /etc/rc.conf
devfs_system_ruleset="devfsrules_common"
%

It will work with dynamic attachments,

also, please not there one xptX device for single CAM bus

-- 
Vladimir B. Grebenchikov
vova_at_fbsd.ru
Received on Fri Oct 15 2004 - 10:39:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:17 UTC