Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 2003 09:45:35 -0700
From:      Dr Lyman Hazelton <lrh@alum.mit.edu>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Non-root access to peripheral file devices
Message-ID:  <200311180945.35813.lrh@alum.mit.edu>

next in thread | raw e-mail | index | archive | help
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? 

       -Lyman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311180945.35813.lrh>