maxim wexler wrote:
Hello everyone,

I have a fat32 partition on another drive /dev/hda5
which is listed in /etc/fstab like this:

/dev/hda5  /home/blissfix/fat vfat auto,user o o

But as user I have no access, only as root.


This is normal. The 'user' or 'users' option only allows users to mount the given partition on the fly; it does not specify ownership for auto-mounted partitions such as this, which will always be owned by root and the root group by default (all partitions mounted automatically by fstab are owned by root and the root group, unless you use options that change this behaviour, or mount the partitions manually as a user after booting).



cat /proc/mounts reveals:

/dev/hda5 /home/blissfix/fat vfat
rw,nodiratime,nosuid,nodev,noexec,fmask=0033,dmask=0033
0 0

not sure what this means but even as root chown gives:

chown: Changing ownership of '/home/blissfix/fat/*':
operation not permitted.

No, because you cannot operate on a mount point controlled by /etc/fstab. You would have to unmount the partition first, then remount it as a user.



BTW, /home is part of my root partition:

/dev/hdb3 / reiserfs noatime 0 1

But the way to solve this problem is to use the vfat options that specify ownership and umask for fat32 partitions:


uid=user_id_by_name_or_number,gid=group_id_by_name_or_number,umask=###


The default ownership for any newly created files is 777, the default ownership for newly created folders is 666. Umask *removes* permissions from this setup, so a umask of 222 would result in the mounted partitions having permissions of 555 or 444. See man mount for more information on these options.


Don't forget to unmount the partition, and change the permissions on the mount point to conform with your desired ownership and permissions before remounting. Nothing more annoying than having the user owning all the files, but being unable to save changes because they cannot write to the folder in which the files are contained.

Hope this helps,

Holly
--
[email protected] mailing list



Reply via email to