After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 343559 - Gedit has trouble creating backup files on vfat partition
Gedit has trouble creating backup files on vfat partition
Status: VERIFIED FIXED
Product: gedit
Classification: Applications
Component: general
2.18.x
Other All
: Normal major
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-01 06:09 UTC by Uri David Akavia
Modified: 2008-05-21 22:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Uri David Akavia 2006-06-01 06:09:34 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.
Comment 1 Duncan Lithgow 2006-07-26 16:44:02 UTC
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
Comment 2 Constantine Evans 2006-10-31 00:45:32 UTC
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.
Comment 3 Sebastien Bacher 2006-10-31 10:13:07 UTC
Ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/gedit/+bug/69184
Comment 4 Duncan Lithgow 2007-03-24 19:58:31 UTC
This bug is still present in gEdit 2.18.0 gnome 2.18.0.
Comment 5 Paolo Maggi 2007-03-25 23:21:34 UTC
The Ubuntu bug has some info on how to reproduce this bug.
Comment 6 Duncan Lithgow 2007-08-13 10:27:17 UTC
Still present in gEdit 2.19.3 (current August version in Ubuntu 7.10)
Comment 7 Constantine Evans 2008-03-18 05:51:15 UTC
I'm almost certain that this is now fixed as of 2.22.0, as the backup-writing code appears to have been rewritten.
Comment 8 Uri David Akavia 2008-05-21 22:49:02 UTC
Confirmed fixed. Moving bug to VERIFIED, since I can't get it to happen again.