Tim Peeler on Sat, 26 Feb 2000 06:25:37 -0500 (EST) |
On Fri, 25 Feb 2000, you wrote: > I had this problem a while back, and noticed that chmod'ing didn't seem > to work for vfat mounted partitions. At the time, I was unable to give > a normal user write access to a vfat partition. I suspect the > suggestion about setting uid will also not work unless you want to leave > the vfat partition unmounted until you log in, and then only the user > mounting it will have access. I've got to try the user,rw option in > fstab though. That sounds like it has potential! A VFAT filesystem has no perm inode, w/o it you can't change any permissions. There are several ways to give write access to anyone. The simplest would be to allow users to mount the fs. That's not really a good idea, because only the first person to mount the fs would have r/w access to it. Another way is to make it a umsdos fs. The only difference between a (v)fat fs and a umsdos fs is the presence of a file named --linux-.--- in each directory and mounting the fs as type umsdos. This would probably be the most secure way of doing it, because then you could set file permissions on a per-file/directory basis. One more way to overcome this problem is by using groups. Create a group called vfat. In your fstab, mount the filesystem as uid=root,gid=vfat. Next, for each user that you'd like to have r/w access to the fs, increase their groups to include vfat. This is just tiny bit more secure than allowing users to mount the fs (and by tiny, I mean finite). It also overcomes the limitation of giving r/w to only the first person to mount the fs. If it were me, I would go with the umsdos option. You don't need to have a --linux-.--- file in each directory though. ONLY the directories that you would like to change permissions in. For example, if you want to change permissions to /mnt/shux/mp3s/* but not to /mnt/shux/*, then all you would need to do is "touch /mnt/shux/mp3s/--linux-.---", umount the fs, and remount as type umsdos. Then you can change the permissions to whatever you want (including the evil 666) A bonus using the umsdos fs, is that you don't have to give users the ability to mount the fs, let fstab take care of that. Use default mount options and you'll have a more secure fs. Tim Related docs: UMSDOS-HOWTO chmod(1)(2) mount(2)(8) fstab(5) umsdos.txt (under the Documenation/filesystems directory of the linux kernel source) ______________________________________________________________________ Philadelphia Linux Users Group - http://plug.nothinbut.net Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce General Discussion - http://lists.nothinbut.net/mail/listinfo/plug
|
|