Subject: Re: Allow non-root users to access to CD-ROM and Floppy
To: James Gray <marlin@sdf.lonestar.org>
From: Johnny Billquist <bqt@Update.UU.SE>
List: netbsd-users
Date: 09/03/2004 13:36:27
On Fri, 3 Sep 2004, James Gray wrote:

> Hello, I am trying to allow not root users to access CD-ROM and Floppy 
> drives.
> The relevant sections of my fstab are shown below:
>
> /dev/cd0a    /cdrom   cd9660    ro,noauto    0    0
> /dev/fd0a    /floppy    msdos      rw,noauto   0    0
>
> the relevant folders and devices are shown below:
>
> brw-rw-rw-   1   root   operator   6,   0 Sep   3 21:04 /dev/cd0a
> brw-rw-rw-   1   root   operator   2,   0 Sep   3 21:04 /dev/fd0a
>
> drwxr-xr-x    2   James  users   512 Sep   3 21:18 cdrom
> drwxr-xr-x    2   James  users   512 Sep   3 21:17 floppy
>
> "mount /floppy" and "mount /cdrom" works fine as root, but not when I'm 
> logged in as "James". could someone tell me where I'm going wrong?

Normal users are normally not allowed to do mounts, no matter what.
You can change that with sysctl, setting vfs.generic.usermount=1

 	Johnny

Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol