On Mon, 13 Dec 1999,  greyn wrote about,  Re: Mounting Drives:
> On Sun, 12 Dec 1999, Richard Adams wrote:
> 
> > On Sun, 12 Dec 1999,  greyn wrote about,  Re: Mounting Drives:
> > > On Sun, 12 Dec 1999, Richard Adams wrote:
> > > 
> > > /dev/fd0       /aext2      ext2        noauto,user,unhide    0   0
> > > /dev/fd0       /avfat      vfat        noauto,user,unhide    0   0
> > > /dev/sda       /zip        ext2        noauto,user,unhide    0   0
> > 
> > Just remove the "unhide"
> 
> Thanks a lot for all the help. Removing the unhide seems to have done the
> trick. I can now mount and unmount my zip, floppy and cdrom as any of my
> users.  

"seems" it will work or it wont ;-)

Anyway this has got to my interest as in the manual page for 'mount' it
states;

       (ii)  When  mounting  a  file  system  mentioned  in fstab, it suffices to give 
only the
       device, or only the mount point.

       (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 

That is "only" true for root according to what happens here and i am
talking about the line stated in the manual page not what the actual
"working" line which is.

      /dev/cdrom  /cd  iso9660  ro,user,noauto

man mount makes no mention of the 5th and 6th fileds we normaly have in
fstab, however the man page of fstab does say;

          The  fifth  field,  (fs_freq),  is  used for these filesystems by the 
dump(8) command to
       determine which filesystems need to be dumped.  If the fifth field  is  not  
present,  a
       value  of  zero is returned and dump will assume that the filesystem does not 
need to be
       dumped.

Which means if there is no numbers after ro,noauto then "0 0" will be
assumed.

I think both myself and Lawson said that there should be a 5th and a 6th
field, i myself said that because when a distribution creates the file
fstab at install time it automaticly adds "0 0" for the cdrom and the
floppy, so it cant be a bad idea to have them there anyway, it could
possably decrease the amount of system calls needed to complete the
command, therefor speeding up the process, that is just a thought of mine
but could well be true.
    
As to why the unhide stops a "user" from mounting the drive is possably a
modification in the code which has taken place after the man page was
written, linux is very well known for its "out of date" manual pages and
documentation, the best place to look for changes is, yes you guessed it,
the Changes file in the kernel source Documantation directory. Anyway
considering it all works now i have lost my interset in finding out why. ;-)

Another point, Lawson and i said, use "user" NOT "users", now i have read 
the man page more than once, but, i did not know one CAN use "users" it is
certanly NOT recomended to do so as "ALL USERS" may then unmount drives.
That means user a, mounts the cdrom and then user b, unmounts it while user
a, is still using it, that is NOT such a good idea is it.?.

If it is of any consulation, when i set "unhide" i cant mount the drive as
a user either. Of course we all could be doing something wrong, as really
the only person who knows how the mount program works "inside" is the
person who wrote it, or modified it.

Now i think we all have learned from this one, at least thats the way it
looks judging from the answers you received from "us" all.

> 
> *************************************************
> [EMAIL PROTECTED]
> Edmonton, Alberta, Canada
> *************************************************
-- 
Regards Richard
[EMAIL PROTECTED]
http://people.zeelandnet.nl/pa3gcu/
Merry Xmas.

Reply via email to