On Sun, 3 Mar 2002 21:44, Janus Christensen wrote:
> Hello.
>
> I have recently purchased a M-Systems DiskOnKey, and while I can read
> from and write to it on my Linux box (RedHat 7.2, kernel 2.4.17), I am
> experiencing some problems with mounting the device.
>
> When I insert the device into the USB port an entry is created in
> /etc/fstab:
>
>   /dev/sda1    /mnt/diskonkey    auto    noauto,owner,kudzu 0 0
>
> The only way I have been able to mount the device is with
>
>   mount /dev/sda /mnt/diskonkey
>
> as root. If I try as any other user I get
>
>   mount: only root can do that
>
> Whilst the device works when mounted as root and I can read from it with
> a normal user, I can only write to it if I su to root, which is rather
> annoying.
But is at least secure.

> I have the following questions for which I hope somebody on the list
> will have answers to:
>
> 1) Why can't I mount the device when I am logged in as a non-root user?
> The options in the fstab entry are the same as for the floppy device (as
> well as the filesystem type 'auto'), and this I can mount as any
> non-root user with
>
>   mount /mnt/floppy
You should read relevant docs before posting. In this case, man mount tells 
you the answer. Here is a verbatim extract from the man page on a RH7.2 
install:
<quote>
       (iii)  Normally, only the superuser can mount file systems.  However, 
when fstab contains the user option on a line,  then anybody can mount the 
corresponding system.

       Thus, given a line
              /dev/cdrom  /cd  iso9660  ro,user,noauto,unhide
       any user can mount the iso9660 file system found on his CDROM using the 
command
              mount /dev/cdrom
       or
              mount /cd
       For more details, see fstab(5).  Only the user that mounted a 
filesystem can unmount it again.  If any  user  should   be  able  to  
unmount,  then  use  users instead of user in the fstab line.  The owner 
option is similar to the user  option, with the restriction that the user 
must be the owner of the special  file.  This  may  be  useful  e.g.  for       
/dev/fd if a login script makes the console user owner of this device.
</quote>

> Is it because the DiskOnKey device is a SCSI device?
Nope.

> 2) Where does the fstab entry come from in the first place? Kudzu?
> Hotplug? Any pointers on how to make configure the "thing" that creates
> the fstab entry so a non-root user can mount the device would be great.
Probably from kudzu, from the /etc/fstab line.

Brad

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to