atapicam(4) as KLD?

Vladimir Grebenschikov vova at fbsd.ru
Fri Oct 15 05:39:28 PDT 2004


В пт, 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


More information about the freebsd-current mailing list