Trying to save a file over SSH with GVim doesn't work; fails with "cannot open file for writing"

Bug #1852927 reported by Adam Novak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
New
Undecided
Unassigned

Bug Description

To reproduce:

1. Have an SSH server you have access to. It could even be localhost.

2. Open "Files" (Nautilus), hit Ctrl+L to get the URL bar, and type in "ssh://your.server", and hit enter.

3. Authenticate to the server if necessary. It should now be mounted.

4. Create a new text file with Nautilus on the server.

5. Open that file in GVim. If GVim is not your default editor you need to right-click and choose it in "Open With Other Application".

6. Add some content to the file.

7. Try to save the file.

Expected Behavior:

The file should save successfully.

Observed behavior:

The file is not saved. Instead, GVim reports an error:

"/run/user/1000/gvfs/sftp:host=your.server/path/to/your/file.txt: E212: Can't open file for writing"

If I navigate to that local mount directory in Bash, the file is there, with writable permissions, and I can edit it with e.g. nano. I also have no trouble wditing it with gedit.

Trying to edit it with CLI "vim" produces the same E212 error.

This problem started fro me with Ubuntu 18.04 and Vim 8. If I build Vim 7 from source, I don't have the problem.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: vim 2:8.0.1453-1ubuntu1.1
ProcVersionSignature: Ubuntu 4.15.0-70.79-generic 4.15.18
Uname: Linux 4.15.0-70-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7.9
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun Nov 17 11:11:55 2019
InstallationDate: Installed on 2017-08-06 (832 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: vim
UpgradeStatus: Upgraded to bionic on 2018-05-29 (537 days ago)

Revision history for this message
Adam Novak (interfect) wrote :
Revision history for this message
Adam Novak (interfect) wrote :

Looks like I reported this already ages ago, but as far as I can tell nobody noticed.

Adam Novak (interfect)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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