[TriLUG] FSTAB and mouting
Aaron S. Joyner
aaron at joyner.ws
Mon Aug 7 22:34:18 EDT 2006
Roy Vestal wrote:
> I want to mount /dev/hdc to /data1 with a group, music with rwx perms.
> It's an ext3. I can't for the life of me find it in the stupid man pages.
>
> Any suggestions?
I think you're trying to apply something you can do with a VFAT
partition, to an ext3 partition. If you check out the mount(8) man
page, you'll see the uid= and gid= options under the fat filesystem
section. This sets the group which owns all files on the filesystem.
Since there aren't file-specific ownership and group attributes, the
filesystem driver uses a single user, as defined at mount time, via args
passed to mount. Because there are specific ownership and group
attributes for each individual inode in the ext3 filesystem, there's not
a natural way to "override" that with the mount command. If you want a
permanent way to change all files under /data1 after you mount it, you
might consider something like this:
find /data1 -type f -exec chmod g+rwx \{\} \;
find /data1 -type f -exec chgrp $group \{\} \;
Add "-type f" if you want to apply those rules only to the files (you
probably don't, but it seemed worth mentioning).
Aaron S. Joyner
More information about the TriLUG
mailing list