gedit error "Could not create a backup file" when trying to save a file in a VFAT partition

Bug #69184 reported by Ari
14
Affects Status Importance Assigned to Milestone
gedit
Fix Released
High
gedit (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

I have an edgy (final) fresh install. It detected and mounts on boot my FAT32 drive that I share with windows.

I can create and delete files in this partition with no problems with all applications including gedit itself.

The problem is, when I try to save the new file again (or to save a file just opened and modified), gedit always gives me an error message:

Could not create a backup file while saving /home/ariel/Desktop/MyFolder/mynewtextfile.txt

It looks like the backup filename has something in it that is not supported in a vfat partition, or there is some problem with the way ubuntu sets the default permissions

In any case, this is annoying. It happened to me previously with Dapper in another machine. Hopefully this can get fixed soon!

Note: being a vfat partition, the user:group is set now set to root:root (initially, the group was plugdev but I changed that to see if it fixed my problem; it didn't help at all).

My current fstab entry is:

UUID=d5628904-b3cf-4aaa-ae5b-5adb62952fbd
/media/sda6 vfat iocharset=utf8,umask=000,user 0 0

Revision history for this message
Constantine Evans (cevans) wrote :

I'm confirming this after reproducing it with a clean loop mounted image - vim works without an error, but gedit gives this error.

Changed in gedit:
status: Unconfirmed → Confirmed
Revision history for this message
Constantine Evans (cevans) wrote :

I've figured out the problem, and added a description of it to the upstream bug. For now, you can get around the issue by mounting with the option umask=(YOUR_USER_NUMBER) instead of umask=000 (probably umask=1000).

Changed in gedit:
status: Unknown → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the bug and for the upstream pointer

Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Low
Revision history for this message
Ari (ari-reads) wrote :

Hi Constantine, first thanks a lot for your quick response!

On umask: It doesn't look like that option will accept a user number... it seems to be a permission mask for filesystems that don't support builtin unix permissions

 umask: octal file permissions

You can change permissions using the parameter umask. But be aware that it must be the bitmask of permissions that are not present for the mountpoint. It is an octal number, formed like this:

    * character '0': Indicates that this is an octal number, not decimal.
    * first digit: owner user permissions
    * second digit: owner group permissions
    * third digit: world permissions (every other user on the system)

Revision history for this message
Constantine Evans (cevans) wrote : Re: [Bug 69184] Re: gedit error "Could not create a backup file" when trying to save a file in a VFAT partition

My apologies - I meant uid, not umask.

Ari wrote:
> Hi Constantine, first thanks a lot for your quick response!
>
> On umask: It doesn't look like that option will accept a user number...
> it seems to be a permission mask for filesystems that don't support
> builtin unix permissions
>
>
> umask: octal file permissions
>
> You can change permissions using the parameter umask. But be aware that
> it must be the bitmask of permissions that are not present for the
> mountpoint. It is an octal number, formed like this:
>
> * character '0': Indicates that this is an octal number, not decimal.
> * first digit: owner user permissions
> * second digit: owner group permissions
> * third digit: world permissions (every other user on the system)
>
>

Revision history for this message
Duncan Lithgow (duncan-lithgow) wrote :

This bug is still present in gEdit 2.18.0 gnome 2.18.0.

Revision history for this message
markba (mark-baaijens) wrote :

I can confirm this on Edgy and Feisty.
In my case, I connect to a Samba share through a mount:
mount -t smbfs -o lfs,fmask=0777,dmask=0777,codepage=cp850,iocharset=utf8 //lin01/public /media/lin01-public

Revision history for this message
Duncan Lithgow (duncan-lithgow) wrote :

Still present in gEdit 2.19.3 (current August version in Ubuntu 7.10)

Changed in gedit:
status: Confirmed → Triaged
Revision history for this message
Constantine Evans (cevans) wrote :

It seems that the backup-writing code has been rewritten (to begin with, it's now in gedit-local-...). This error no longer occurs in hardy, with 2.22, and was probably fixed in even earlier versions.

Changed in gedit:
status: Triaged → Fix Released
Changed in gedit:
status: Confirmed → Fix Released
Changed in gedit:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.