Quote:
Originally posted by Covel
Since we're on the subject, how come only I can only write to my windows partition if I'm root? I've tried the uid,gid, user and users options but no luck
|
need to add the umask override option in your windows partitions line in fstab. depending on how you want to secure your windows partition and who you want to give write permissions to on that partition will determine what gid and umask combination you want. for instance...
/dev/hda1 /mnt/c vfat auto,owner,gid=windows,umask=0002,exec,rw 0 0
tells you that when this partition is mounted it is owned by user root and group windows. the umask starting from the second 0 (002) means that the partition will be mounted the permissions rwx-rwx-r-x meaning that only the owner (root) and anyone in the group windows can write to that partition (while everyone - root, users in the windows group, and other can read and exec). all others have only read and exec permission. this let's you specify a select group of users who has full permissions on that partition. you'll need to create the group windows and add the users you want to have full permission to that group.
if you don't care and want everyone and their mother accessing your computer to have full permissions on that partition, then you only need to add the umask option with no gid.
/dev/hda1 /mnt/c vfat auto,owner,umask=0000,ecec,rw 0 0
i personally go with the first way on all my windows partitions, as it is more secure that way and helps to prevent joe schmoe who just happens to have access to my computer from doing something like deleting my system.ini or win.ini, etc... actually i'm even more paranoid about my c:\ drive since it's a win9X-ME install with outlook/oe passwords, profile passwords, etc. (win9X-ME passwords are easily cracked). i don't even let others read or exec permissions. so my windows partitions in fstab look something like this:
/dev/hda1 /mnt/c vfat auto,owner,gid=windows,umask=0007,exec,rw 0 0
/dev/hda5 /mnt/d vfat auto,owner,gid=windows,umask=0002,exec,rw 0 0
umask=0007 leaves a mount permissions of rwx - rwx - ---
remember how the umask values correspond to chmod values.
Code:
umask chmod
----- --------
0 7 - rwx
2 5 - r-x
7 0 - ---
also remember that after changing your fstab, you need to unmount the partition and remount it using the umount and mount commands.