[svlug] ext2 mount options on 1394 drive

David Hummel ddhummel at pacbell.net
Sat May 17 16:25:34 PDT 2003


Hi Rick,

On Sat, May 17, 2003 at 03:07:43PM -0700, Rick Schultz wrote:
> On Sat, May 17, 2003 at 01:29:44AM -0700, David Hummel wrote:
> > Thanks Aaron, I tried the uid/gid options to no avail.  I'm not sure
> > if they're valid options for ext2.
> 
> They shouldn't be.  VFAT filesystems have no concept of file ownership
> or permissions.  That's why you can't chown VFAT files.
> 
> Under ext2, permissions and ownership are stored in the filesystem
> itself.  If you want to be able to write to a directory, you need
> write permission on the directory itself, not the filesystem as a
> whole.

Understood, but does this explain why /mnt/exthd2 is:

  drwxr-xr-x    5 root     root       8192 May 16 18:24 exthd2

during the mount, instead of:

  drwxrwxr-x    5 hummel   hummel     8192 May 16 18:24 exthd2

as it is with vfat and iso9660?  Or perhaps I'm still missing something?

> > I'd just like to be able to script the entire backup process
> > (mount -> rsync -> umount) without being root.
> 
> Try this:
> # mkdir /mnt/exthd2/backup
> # chmod 1777 /mnt/exthd2/backup
> 
> Then do the rsync as whatever user you want, and rsync to the backup
> directory.
> 
> Alternately, you could chown the backup dir to you

Yes, these solutions work just fine.

> or just change permissions/ownership of the root directory of the
> filesystem itself.

You're referring to:

# chown hummel:hummel /mnt/exthd2
# chmod 775 /mnt/exthd2

Right?  I guess this is fine until another user wants to do exactly the
same thing.  I suppose what I'm after is the mechanism that controls the
temporary modification of the ownership/persmissions of the target (or
root) directory at mount/umount time.

Thanks,

David




More information about the svlug mailing list