Re: mounting a fat32 partition, allowing all users
On Fri, 14 Jan 2005 15:00:52 +0000
Joao Clemente <email@example.com> wrote:
> I have setup a dual-boot machine where I have a fat32 partition
> (/dev/hda3). I used debian sarge installer and choosed a mountpoint
> for that partition (/javasoft) and selected it as fat32.
> I see no strange settings in /etc/fstab regarding the setup made by
> the installer. However, I am finding a strange behaviour that I don't
> recall from previous linux installs that I had:
> The user that mounts the partition is the only that gets permission to
> read/execute inside. This was not what I was intending to do.
> What I can see is that
> 1 - Mounting (with default fstab settings) as root
> - my /javasoft gets set root.root rwxr--r-- permissions.
> - I cannot chmod to 755.
> - Even if I chmod to 755 before mouting, it gets the above
> after mounting
> 2 - Changing /etc/fstab from "defaults" to "rw,user,noauto" and
> mounting as jpcl
> - my /javasoft get set to jpcl.jpcl rwxr--r-- permissions (same as
> above, but for user jpcl instead of root)
> What I was willing to achieve was something like
> /javasoft root.root rwxrwxrwx ..
The command "man mount" has some helpful information on this.
Particularly, the uid, gid and umask options. If you really want the
partition owned by root with a group of root, then you can forget about
the uid and gid options.
Something like this would set ownership to jpcl, group jpcl with
permissions of 777:
/dev/hdax /mnt/pendrive auto rw,user,uid=1000,gid=1000,umask=000 0 0
This line assumes jpcl's id and gid are 1000. Umask works in reverse of
chmod, so if you want everyone to have rwx permissions, it's a umask of
000. If everybody should be able to read and execute but not write, then
it would be a umask of 555.