Hiya,
Working with vfat partitions is a pain. Access denied, access denied. . .
But I learn best when learning the hard way, so here's my solution.
The nagging problem is:
Only root has access to mounted vfat partitions.
These are always part of my multi-boot boxes. I go back to DOS 3.1 and
it's fun to museum around...
First:
In any mounted vfat partition,
chgrp, chown, and chmod don't work at all. Alan was exactly right.
chgrp and chown at least issue error messages,
The operation (by root) errors are misleading, but correct.
But chmod will say it succeded when actually it doesn't.
huh?
I suspected that permissions listed by ls -al were bogus too.
Until I started messing with the options listed in /etc/fstab.
Second:
When the system is allowed to "auto-mount" /dev/sda5 onto
my /Meta directory, that directory (the parent) inherited
root file permissions (or system umask, I think).
When the partition was umounted, the /Meta directory showed "drwxrwxrwx"
When auto-mounted or root-mounted it becomes "drwxr_xr_x" because system did the mount.
That is to say,
the permissions of the unmounted empty directory (before mount runs)
are totally irrelevent. But the current user, group, and umask are very.
>Insanity is inherited, you get it from your children. Q.E.D.
This is prolly true for ANY mount device, on ANY mount point.
Fortunately, the "noauto" option in /etc/fstab will prevent mounting
a partition at startup. But then, someone has to do the mount from CLI.
So, additionally another option "user" (or "users") will allow unprivledged users
to run mount and provide device access, which is the goal of this exercise.
I found that the "users" option alone sets system umask permissions during startup.
Even with "noauto,user" a user mount is further limited, as I found out.
/etc/fstab:
/dev/sda5 /Meta vfat noauto,user 0 0
or
UUID=45F2-140B /Meta vfat noauto,user 0 0
This allows one user to issue:
$ mount /Meta and
$ umount /Meta
But prevents a user from issuing:
$ mount /dev/sda5 /Meta -t ext2
with perhaps some other option-related errors.
noauto,users
is only slightly different allowing any user to mount and any user to umount.
After all this, I added one simple line to my /home/charles/.profile:
mount /Meta
And now I have drag and drop user access to the mounted vfat partition.
This worked in both SuSE 10.3 and Ubuntu 9.07 (Mint-7) and I expect
it works everywhere.
Now, If I can only learn to spell Joseph's name...
(-: Chas.M. :-)
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss