[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mounting a fat32 partition, allowing all users

On Friday 14 January 2005 16.00, Joao Clemente wrote:
> Hi.
> 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
> permissions after mounting

FAT32 doesn't have support for file permissions. That's why you can't 
change them. mount "fakes" the user, group, and global file permissions 
for all the files in that file system when you mount it. If you 
absolutely need to be able to set different file permissions for 
individual files or directories in the file system, use another file 
system. If it is ok with the same permissions for all files, control the 
user, group and permissions with the options in /etc/fstab.

uid   (name or id of the user that will own all files)
gid   (name or id of the group that will own all files)
umask (777-umask becomes the permissions for all files and folder)
fmask (same, affects only files)
dmask (same, affects only directories)

For example:
/dev/hdc1  /mnt/archive1  vfat  rw,auto,uid=myname,gid=mygroup,dmask=027


Reply to: