user mounts of hotplug drives

Rick Stevens rstevens at vitalstream.com
Wed Feb 23 02:05:13 UTC 2005


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?

>    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.

>    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.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-           Denial.  It ain't just a river in Egypt anymore!         -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list