Bug: vim 8 can't write to Gnome Virtual File System mounts while every other program can (including vim 7.4)

11 views
Skip to first unread message

inte...@gmail.com

unread,
Nov 20, 2019, 12:20:52 PM11/20/19
to vim...@vim.org
Somewhere between Vim 7.4 and Vim 8 (or at least the Vim 8 that Ubuntu ships), the ability to write
to files mounted over Gnome's Virtual File System (GVFS) was lost.

See this Ubuntu bug from a few months ago that nobody noticed:

https://bugs.launchpad.net/ubuntu/+source/vim/+bug/1813679

And see also this Ubuntu bug I went to report again today, having forgotten about the first bug
because nobody ever responded to it:

https://bugs.launchpad.net/ubuntu/+source/vim/+bug/1852927

Since the Ubuntu folks don't seem to know what to do about this, I'm bringing it here; apparently
this list serves as the vim bug tracker.

Basically, if you mount a directory over SSH on an Ubuntu desktop, by entering
"ssh://whatever.hostname" in the Nautilus address bar, and then try to edit files there with either
GVim (by opening them from Nautilus) or normal console vim (by doing a "cd
/run/user/1000/gvfs/sftp:host=your.server/path/to/directory/" and then "vim file.txt"), vim can't
save the file. It just says:

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

Nano doesn't have this problem. Bash can send command output to the file. Vim doesn't even have
trouble creating and writing to the swap file. But as soon as I ":w", I get the error, and I can't
save my work.

This works fine if I build 7.4.1689 from source.

Did anyone touch file writing between then and the current version? Is there some kind of extended
log I could obtain that might explain exactly where opening the file for writing goes wrong? Does
vim want to pass some weird open flags now or something?

Please help!
-Adam

Bram Moolenaar

unread,
Nov 20, 2019, 5:09:04 PM11/20/19
to vim...@googlegroups.com, inte...@gmail.com, vim...@vim.org
Wasn't this already reported, with the observation that it happens when
the group-writable bit of the permissions is not set?
Might be related to 8.0.1300, which fixes a problem with using looser
permissions when writing a file.


--
From "know your smileys":
<|-) Chinese
<|-( Chinese and doesn't like these kind of jokes

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages