user mounts of hotplug drives

Mark Knecht markknecht at gmail.com
Wed Feb 23 13:31:29 UTC 2005


On Tue, 22 Feb 2005 18:05:13 -0800, Rick Stevens
<rstevens at vitalstream.com> wrote:
> Mark Knecht wrote:
> > Hi,
> >    I have a 1394 drive which I move between a number of systems. I've
> > got some funky ways of mounting it but I want to do it more naturally.
> > I'd like to just mount the drive under my home directory using the
> > mount command but it's not working due to permissions. I tried this:
> >
> > /dev/sda1               /home/mark/Audio1             vfat
> > rw,noauto,user     0 0
> > /dev/sda2               /home/mark/Gigs               ext3
> > rw,noauto,user     0 0
> >
> > I'm able to mount this as a user, but the directory /home/mark/Gigs
> > which is owned by mark:mark before the mount, switches ownership to
> > root:root when mark mounts the drive and I cannot write to the top of
> > the drive. I can write to the first directory 'Gigs' on the 1394
> > drive, but not to the top.
> 
> Eh?  If I'm reading that right, you CAN write to /home/mark/Gigs/Gigs,
> but NOT /home/mark/Gigs.  Is that correct?

Yes, that was correct. Sorry if it wasn't overly clear. I thought it
was but I'm sitting here looking at the problem, right?

> 
> >    How can I change this fstab entry to allow me to directly mount the
> > drive in my home directory and have write permission? I'm guessing
> > that I must tell the system in fstab to give user mark write access
> > but I cannot figure out what the syntax is.
> 
> The permission of the filesystem will override the mountpoint's original
> ownership.  After the mount, become root and change the ownership of the
> mountpoint to mark:mark.  This should change the filesystem's ownership.

OK, it did. Is this persistent? Will it be there this morning when the
machien comes up? (Likely I'll find out before youwrite back, but
that's the question.) If it is persistent then where is the info
saved? Since /home/mark/Gigs was already owned by mark:mark why does
root have to say in this case that it remains owned by mark:mark after
somethign is mounted there? Is that infomsaved with /home/mark/Gigs so
that if I rename it things will continue to work> Or is it saved
somewher else and root would have to do this again later?

> 
> >    Also, if it's any different for vfat vs. ext3 please point that out.
> 
> Remember that vfat has no concept of ownership or anything of that
> nature.  You can specify "owner" in the options for vfat, so all files
> are "owned" by the UID and GID of the process which mounted it.

Yes, that I understood. I was more concerned about the the actual
mount point (/home/mark/Audio1) and whether I'd be able to write at
the top of that after the drive was mounted.

Thanks!

- Mark




More information about the Redhat-install-list mailing list