Click to See Complete Forum and Search --> : Mounting fat32 partitions R/W for more than just root
ZogGop
01-04-2001, 11:26 AM
I have been trying to mount my 15gb fat32 files partition so that I (as a user) can access it. So, in my /etc/fstab file I have this entry:
/dev/hda5 /files/ vfat defaults,user,exec,rw 0 0
And after it was mounted as root I recursively chmodded /files/ to 777. Then, when I look at it afterwards, the permissions are still the same =(
I heard from my brother that I simply cannot (with out great difficulty) mount fat32 partitions with full access to anyone but root. So... I'm hoping this isn't true, and there's some simple thing I'm missing here.
Anyone care to help?
tko fx
01-04-2001, 12:50 PM
possibly try...
/dev/hda5 /files/ vfat defaults,user,exec,rw 1 1
that's how my linux drives are setup, and my fat32 drive is setup with 1 0 (I assume read, not write)
ZogGop
01-04-2001, 01:53 PM
I just tried your suggestion, still has the same permission problems =(
thanks for trying to help though
A_Lawn_GNOME
01-04-2001, 02:18 PM
Maybe user=... or group=...?
It's never been a prob for me before so I don't know
[This message has been edited by A_Lawn_GNOME (edited 04 January 2001).]
tko fx
01-04-2001, 02:53 PM
my mounted windows partition is..
/mnt/win_c
as it stands, slackware made it owned by
root.root
and it's chmod'ed so that my user can only read the drive, but not write it, maybe change the owner group and chown root.users and allow your users group to write the partition...
that's just an idea, don't know if it'll work though
Strike
01-04-2001, 03:18 PM
Originally posted by tko fx:
...and my fat32 drive is setup with 1 0 (I assume read, not write)
actually, those two fields have to do with "dump" frequency and "pass" priorities... generally just keep the defaults (i.e. copy another line).
mdwatts
01-04-2001, 05:57 PM
Here's something I found recently.
Here's the solution that I've used. I like this one, since it would work well on a multiuser system as well as a regular home system.
First, create a group called "msdos". Note its GID (the number associated with that group; take a look with 'vigr'.) Add yourself to that group -
adduser jfox msdos
(assuming your username is 'jfox'.) Now, in your '/etc/fstab', add the "noexec", "umask" and "gid" parameters to the appropriate partition:
/dev/hda3 /mnt/msdos vfat noexec,umask=003,gid=1001 0 0
Obviously, the GID would be that of the "msdos" group.
What we're doing here is mounting that partition with the appropriate group ID and setting the umask - this masks out the permissions that the mounted partition will have. The "noexec" parameter works with in
concert with the other two to produce the following conditions:
Directory access under the mountpoint is allowed to members of GID 1001
All files under the mountpoint are readable and writable by GID 1001
The files are "read-only" to the other users None of the files are
executable (does not apply to DOS emulation)
It takes a bit to get used to this three-parameter control system, but it is actually very flexible and can be used to set up just about any combination of permissions and directory accessibility you could want.
From this point on, if you want to give a user on your system read/write access to the files on that partition, simply add them to
the "msdos" group.