Gedit won't save to SSHFS mount, cured
I ran into an odd gedit bug on various versions of Ubuntu and Kubuntu; it won't save to an SSHFS mount and says it's a permissions error. But the error message is in error, because it isn't a permisssions error. But before we get to that, here is a quick SSHFS howto. I use SSHFS all the time because it is a great fast way to securely mount a remote directory locally.
I use it all the time because it's fast and easy. Here is my quick how-to-use-SSHFS recipe that mounts my Xena home directory on my Studio computer. First install sshfs, then create a directory on Studio for the sshfs mount. Note how I create the sshfs mountpoint in my homedir, as carla and not root. This eliminates permissions hassles:
carla@studio:~# aptitude install sshfs
carla@studio:~$ mkdir sshfs-xena
Of course you may name your SSHFS directory whatever you want. When I need files from Xena I use this command:
$ sshfs xena:/home/carla sshfs-xena/
Now I have access to my entire home directory on Xena from Studio, and I don't have to worry about having multiple copies floating around because they stay on Xena. You can do this with any remote directory you have permission to access. Unmount with this command:
$ umount sshf-xena
sshfs is faster than using something like ssh -Y, VNC, or FreeNX because your applications are local and not run over the network. It's similar to using NFS or Samba except it's easier to set up and it's on-demand.
Now getting back to gedit. gedit was driving me nuts by refusing to save any documents to an SSHFS mount, telling me I didn't have permission. Ha. It's my PC and I danged well don't need anyone's permission. You should be able to freely edit, copy, and move files around your SSHFS mount just as freely and easily as your local files. Much Web-searching did not turn up any answers. I could save a file that had been changed once if I gave it a different name. But then gedit wouldn't save any more changes to the new file. Finally I figured out that disabling "Create a backup copy of files before saving" cured it. (Edit--preferences--editor.)
So there you go, one more weird little software bug identified and a workaround established.