Non-root access to peripheral file devices

Dr Lyman Hazelton lrh at
Tue Nov 18 08:44:21 PST 2003

Perhaps this is discussed somewhere, but so far I haven't found 
anything that helps.   I have two SCSI CDROM drives (/dev/cd0 and 
/dev/cd1) and an IDE floppy drive.  All of these drives are mountable 
and work flawlessly if I am logged in as root.  Trying to mount any 
of them as any other login-id results in an "operation not permitted" 
message and failure.  I have a /cdrom mount point that is matched 
with /dev/cd0 in /etc/fstab and says its file type is cd9660.  The 
permissions on /dev/cd0 are 0555.  Same for /cdrom.  The owner of 
both is root:wheel.  I already tried setting the permissions to 
5555... no help.  The odd thing is that I can successfully run KsCD 
using either drive as a non-root user and play music through my sound 
card.  (Can't seem to make any other sound work, but that is a 
separate issue.)

I even tried creating a file in /usr/local/bin called mountcd that has 
just the line "mount /cdrom" in it, and setting the super user bit on 
the file.  That works fine for root, but fails the same way for 
non-root users.

Does anyone have a hint that will allow me to fix this problem? 


More information about the freebsd-questions mailing list