mounting ext2 drive as different user than root

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Austin Godber
Date:  
Subject: mounting ext2 drive as different user than root
Jeff Barker wrote:
> Alright.... lets try this a different way... forget samba for now.
>
> How can I allow everyone in the user group to read and write to a
> mounted drive? simply chowning/chgrping it is not working. Am I
> completely clueless or what?


Well, it depends on the filesystem. Chown, chmod and chgroup will work on any
filesystem that supports UNIX style permissions (ext2, ext3, xfs, those UNIX-y
things). If you are mounting vfat (which I think you mentioned, but I didn't
keep track of exactly what was what throughout your thread), the ownership and
permissions are set with the mount command or the fstab entry for that drive.

 From the mount manpage the section about "Mount options for fat":
        uid=value and gid=value
               Set the owner and group of all files. (Default: the uid and  gid
               of the current process.)


Actually there is no "mode" entry in the fat section so I guess you rely on
whether or not the partition was mounted with ro or rw. The permissions on the
mountpoint only (/mnt/vfat_fs should be readable and executable probably)
probably need to be set properly since the mountpoint is still in the UNIX
filesystem.

Warning, some of this information may not be 100% accurate as I haven't a vfat
filesystem to test with. But the destinction between filesystems with UNIX
permissions and those without is important. Then again ... maybe you know that
... and maybe someone else has already mentioned it.


Good luck

Austin

PS - chown and chmod should ABSOLUTELY work on ext2 and ext3. Assuming the
partition is mounted rw.