how can I mount an fat32 partition with full access for a normal user? (FC5)
Hi all,
I'm about to run out of space on my 60GB hdd (/dev/hda3), and I happen to have an extra 40GB hdd (/dev/hdb1) installed, which is a fat32 partition. I now have the line below in my /etc/fstab * * /dev/hdb1 /mnt vfat defaults 1 1 * * But after hdb1 has been (automatically) mounted, all the files on it has an ownership as "root:root".. and I would like to have hdb1 mounted under one of the normal user $HOME dir, with full access for a normal user. (which will make my life much more easier).. I know it's all in the man pages, and I've read it many times.. Guess I really could use some help.. Thanks! |
The thing you need to change is the defaults bit, which defines the option with which the device is mounted. You'll need to know what your user ID (or UID) is - not your login name, but an actual number which represents your user to the system. You can issue the following command to find out (if you're curious, it displays all the lines from the login file /etc/passwd, filters them to only display the ones with your login name, then only shows the third field which is your UID):
Code:
cat /etc/passwd | grep <your username> | cut -d: -f3 The reason being that non-Linux filesystems like FAT don't store file permissions, so Linux has to guess at them - and defaults to making it root-accessible. The uid=<UID> line tells Linux to consider that user as the owner of the files on the device (and you can also use gid= to set the owning group, should that be necessary). IIRC, you can also pass these options on the command line if you're mounting something manually as root but want to access is as a normal user. |
Quote:
/dev/hdb1 /mnt vfat auto,user,umask=000,exec 0 0 The "auto,user,umask=000,exec" part is important. |
Thanks for the quick reply!
The problem is solved, for now. Stillso much remains to be learned.. |
Quote:
|
All times are GMT -5. The time now is 02:45 AM. |