[Gllug] mounting EXT2

John Winters john at sinodun.org.uk
Mon Jan 16 17:36:48 UTC 2006


On Mon, 2006-01-16 at 17:19 +0000, Emon wrote:
> Hi all
> 
> I had the following line in my /etc/fstab
> 
> /dev/hda14  /mnt/hd/MAGIC-STORE vfat  uid=1000,gid=100,fmask=133
>  1  0
> 
> but I just converted the partition to EXT2, and now the line is
> 
> /dev/hda14  /mnt/hd/MAGIC-STORE ext2  defaults  1  0
> 
> but now I get read-only access to the partition; one way around
> it is to change the "defaults" option to "noauto,user" but then
> I will have to manually mount the partition every time.
> 
> So is there any way to mount it automatically at boot time &
> also give me read-write access??

I presume you mean you can't write to it as your normal user, not that
it's been mounted read-only.  This is because ext2 understands the
concept of file ownership, where FAT doesn't.  By default the directory
belongs to root and unless he's granted world write access you won't be
able to write there.

Assuming you want this partition to be accessible to just your user id
(and further assuming that your user id is "emon" - adjust if not), type
the following as root:

# chown emon /mnt/hd/MAGIC-STORE

and that will change the owner to be you.  You might also want to change
the group.  You can do that in a similar way with chgrp.

Do this whilst the partition is mounted and the change will persist.
You only need to do it once.

HTH
John

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list