User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060926 Firefox/1.5.0.7 Build Identifier: I have a vfat filesystem (dual-boot) that I mount read/write on startup. When I use thunar to navigate that filesystem, somehow it gets remounted readonly, the little "not" emblem starts to appear on files. If I open thunar and navigate around, avoiding that directory, nothing happens. For example, I have a directory "/mnt/drv". I can go to /dev /home, /whatver without effecting that share. But if I go into /mnt/share, or go to /mnt and hit F5, then it locks all the files. The permissions are still as I left them from the mount, and the mount command doesn't show any difference from the original mount. Reproducible: Always Steps to Reproduce: 1. Mount filesystem (vfat confirmed) for write access by user. 2. Open a file under that filesystem in an editor (ie. mousepad) 3. Try to save it (it should work the first time) (don't close it) 4. Open thunar to any directory not under the filesystem 5. Try to save the file again (should still save) 4. Navigate thunar to a directory under the mounted filesystem 5. Try to save the file again (should give error) 6. The only fix could find is to unmount it completely, and mount it again. A simple -o remount doens't seem to work. Actual Results: The file was locked and write access was denied. Expected Results: The file's writeability should not have been altered. I'm running gentoo. Glibc 2.4-r1 GTK+ 2.10.6 fstab: /dev/hda2 /mnt/d-stuff vfat exec,uid=500,gid=500,owner,user,users,umask=113,dmask=022 0 0 mount command both before and after change (they are the exact same): /dev/hda2 on /mnt/d-stuff type vfat (rw,noexec,nosuid,nodev,uid=500,gid=500,umask=113,dmask=022) I also have NFS mounts which are unaffected by this.
Oops, sorry, somehow I started to throw the word "share" in. That should read: > For example, I have a > directory "/mnt/drv". I can go to /dev /home, /whatver without effecting that > filesystem. But if I go into /mnt/drv, or go to /mnt and hit F5, then it locks > all the files.
Well, all I can tell you for sure is that Thunar doesn't remount already mounted file systems. In fact it doesn't mount file systems at all, unless you click on a removable drive/media in the side pane. If the mount output is the same, then the device wasn't remounted "ro" anyway, so maybe it's a problem with the file system or your kernel. If Thunar displays the little "ro" emblem, it means, that the kernel told Thunar "you are not allowed to write here" (using the access() system call). In either case, that's definitely not a bug in Thunar, but likely a bug in the kernel or the fs driver triggered by Thunar or mousepad. Maybe ask on a gentoo mailinglist and post the exact error message ("The file was locked and write access was denied." doesn't help).
...another possiblity: Do you use Gamin with inotify? If so, try w/o Gamin. Maybe inotify doesn't play well with vfat.
(In reply to comment #3) > ...another possiblity: Do you use Gamin with inotify? If so, try w/o Gamin. > Maybe inotify doesn't play well with vfat. > I've never even heard of Gamin before now, and I checked my installed packages, and it's not installed. Sorry if my error messages weren't descriptive, but the messages displayed vary with the application (Thunar gives "Failed to change permissions of [file]. Read-only filesystem." if I try to change permissions of a file on that filesystem, other options such as rename are disabled) For example vim displays "E45: 'readonly' option is set (add ! to override)", trying to override gives: "E212: Can't open file for writing" Well either way I'll continue to look at the problem, I would definately like to use this filemanager. If I can pinpoint the problem, I'll let you know if you want. It might very well be a Gentoo-specific problem, there are plenty of patches for other apps in the distro. I was just hoping you might've had some ideas.
I'd check the kernel first. If Thunar says "Read-only file system" (EROFS) and vim says that as well, but it's still mounted "rw", it's very likely a bug in the kernel.
After considering your comments, I decided to examine the kernel logs (I don't know why I never think of this first), and there is an panic saying: Jan 15 03:00:19 toshiba kernel: FAT: Filesystem panic (dev hda2) Jan 15 03:00:20 toshiba kernel: fat_get_cluster: invalid cluster chain (i_pos 0) Jan 15 03:00:21 toshiba kernel: File system has been set read-only Jan 15 03:00:21 toshiba kernel: FAT: Filesystem panic (dev hda2) Jan 15 03:00:21 toshiba kernel: fat_get_cluster: invalid cluster chain (i_pos 0) So I ran fsck, and it found a bunch of errors. I certainly wasn't expecting filesystem errors. It does puzzle me as to why thunar was the only program to cause strange reactions to the errors. Perhaps there could be a way to have thunar intercept the filesystem panic, and inform the user there is an error. It would certainly reduce the confusion, as I have found. Thanks for the help, and I apologize if this post didn't belong in this forum.
Such things are hidden deep within the kernel and there's no way for an application to get informed about this (except the errno result, which was EROFS in this case). A small notification utility monitoring the kernel logs might be more useful here.