GNOME Bugzilla – Bug 343559
Gedit has trouble creating backup files on vfat partition
Last modified: 2008-05-21 22:49:02 UTC
I have a vfat partition, which is appears in /etc/fstab as: /dev/hda10 /dos vfat umask=000,user,shortname=mixed 0 2 If I open files in gedit (which I use to edit my scripts), I get a message that gedit couldn't save a backup file, would I like to save anyway? This always happens in the first time I try to save. Permissions - I have write permissions. $ ls -l drwxrwxrwx 2 root root 4096 2006-06-01 09:08 scripts Xemacs has no problem creating backup files ending with ~. $ ls -l scripts/ total 16 -rwxrwxrwx 1 root root 3814 2006-05-25 10:15 Mapping_to_Genes.pl -rwxrwxrwx 1 root root 355 2006-05-23 22:18 Mapping_to_Genes.pl~ -rwxrwxrwx 1 root root 1472 2006-05-22 22:56 R-commands.R -rwxrwxrwx 1 root root 1280 2006-06-01 09:08 test_Ensembl.pl The file Mapping_to_Genes.pl~ was created with xemacs. If I copy this directory to my home partition (ext3 partition), gedit has no problem creating backup files.
I have exactly the same problem. Gedit cannot make backup files to a vfat / fat32 partition. Big problem for me as I store everything on the vfat partition so it's accessable from windows when needed. This bug effects migration from windows only systems to windows/linux dual boot. My fstab permissions are: /dev/sda9 /media/storage vfat umask=000 0 2
I've figured out what is causing this bug, but am somewhat unsure of how to go about fixing it. In 2.16.1, the problem is around line 808 of gedit-document-saver.c. If the fchmod there fails, as it does in the case of a vfat partition, since group permissions can't be cleared, then gedit backs out of actually making the backup. It does this because the group is set to root in your situation. I could try to make it so that it ignores this if the filesystem doesn't allow it, but I'm not sure how to go about doing so. I will look into the problem.
Ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/gedit/+bug/69184
This bug is still present in gEdit 2.18.0 gnome 2.18.0.
The Ubuntu bug has some info on how to reproduce this bug.
Still present in gEdit 2.19.3 (current August version in Ubuntu 7.10)
I'm almost certain that this is now fixed as of 2.22.0, as the backup-writing code appears to have been rewritten.
Confirmed fixed. Moving bug to VERIFIED, since I can't get it to happen again.