vim-gtk can no longer save to non-group-writable files in GVFS SFTP mounts in 18.04

Bug #1813679 reported by Adam Novak
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Invalid
Low
Unassigned
nautilus (Ubuntu)
Invalid
Low
Unassigned
vim (Ubuntu)
New
Undecided
Unassigned

Bug Description

In Ubuntu 16.04, with gvim 7.4.1689, I can open files over GVFS SSH mounts (by going to `ssh://wherever` in the address bar in the file browser and double-clicking on the file), edit them, and save them.

In Ubuntu 18.04, when I install `vim-gtk` and try to do the same thing, I can open the files just fine, but when I try to save them I get a message that Vim "Can't open file for writing".

If I check out the Vim source tree and build and install vim v7.4.1689, which is what Xenial is shipping now, and use *that* gvim on Ubuntu 18.04, I can save over SSH mounts. I can also save fine from gedit.

Something is wrong with the gvim shipping with 18.04.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: vim-gtk (not installed)
ProcVersionSignature: Ubuntu 4.15.0-44.47-generic 4.15.18
Uname: Linux 4.15.0-44-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Jan 28 15:55:56 2019
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: vim
UpgradeStatus: No upgrade log present (probably fresh install)

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

This is an interaction between vim and GVFS, so I've added GVFS as affected.

summary: - vim-gtk can no longer save to GVFS STFP mounts in 18.04
+ vim-gtk can no longer save to GVFS SFTP mounts in 18.04
Revision history for this message
Adam Novak (interfect) wrote : Re: vim-gtk can no longer save to GVFS SFTP mounts in 18.04

I can actually only get this to manifest *for files created by Nautilus*. Files that are created from an ssh session or by cd-ing into the /run/user/1000/... directory are unaffected. So I guess this also affects Nautilus?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Does it only happen directly after creating the file or is it still an issue for those files after e.G a reboot?

Could you see if there is anything different in permission/ownership between the files created by nautilus and from the commandline?

Changed in nautilus (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Adam Novak (interfect) wrote : Re: [Bug 1813679] Re: vim-gtk can no longer save to GVFS SFTP mounts in 18.04

The permissions and ownership are the same. It seems to persist across ejecting and remounting the SSH mount. I can see if it persists across a reboot or magically spreads from one SSH mount to a different mount (via a different hostname/ip for the same machine), but I suspect it won't.

November 18, 2019 12:37 PM, "Sebastien Bacher" <email address hidden> wrote:

> Thank you for your bug report. Does it only happen directly after
> creating the file or is it still an issue for those files after e.G a
> reboot?
>
> Could you see if there is anything different in permission/ownership
> between the files created by nautilus and from the commandline?
>
> ** Changed in: nautilus (Ubuntu)
> Importance: Undecided => Low
>
> ** Changed in: nautilus (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1813679
>
> Title:
> vim-gtk can no longer save to GVFS SFTP mounts in 18.04
>
> Status in gvfs package in Ubuntu:
> New
> Status in nautilus package in Ubuntu:
> Incomplete
> Status in vim package in Ubuntu:
> New
>
> Bug description:
> In Ubuntu 16.04, with gvim 7.4.1689, I can open files over GVFS SSH
> mounts (by going to `ssh://wherever` in the address bar in the file
> browser and double-clicking on the file), edit them, and save them.
>
> In Ubuntu 18.04, when I install `vim-gtk` and try to do the same
> thing, I can open the files just fine, but when I try to save them I
> get a message that Vim "Can't open file for writing".
>
> If I check out the Vim source tree and build and install vim
> v7.4.1689, which is what Xenial is shipping now, and use *that* gvim
> on Ubuntu 18.04, I can save over SSH mounts. I can also save fine from
> gedit.
>
> Something is wrong with the gvim shipping with 18.04.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 18.04
> Package: vim-gtk (not installed)
> ProcVersionSignature: Ubuntu 4.15.0-44.47-generic 4.15.18
> Uname: Linux 4.15.0-44-generic x86_64
> NonfreeKernelModules: nvidia_modeset nvidia
> ApportVersion: 2.20.9-0ubuntu7.5
> Architecture: amd64
> CurrentDesktop: ubuntu:GNOME
> Date: Mon Jan 28 15:55:56 2019
> ProcEnviron:
> TERM=xterm-256color
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: vim
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1813679/+subscriptions

Revision history for this message
Adam Novak (interfect) wrote : Re: vim-gtk can no longer save to GVFS SFTP mounts in 18.04

Sorry, I misremembered my results from yesterday. I just checked again. The permissions are in fact different: the Nautilus-created files are 644 (because my "New Text Document.txt" template in ~/Templates is 644), while files created with e.g. touch are 664.

Since both allow me, the owning user, to write the file, vim still shouldn't have problems, but it does seem like that is the underlying cause, rather than Nautilus having been used to create the file.

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

I did a bisect as asked in the upstream issue I reported at https://github.com/vim/vim/issues/5237 and I think that https://github.com/vim/vim/commit/cd142e3369db8888163a511dbe9907bcd138829c is the offending commit.

summary: - vim-gtk can no longer save to GVFS SFTP mounts in 18.04
+ vim-gtk can no longer save to non-group-writable files in GVFS SFTP
+ mounts in 18.04
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the investigation, looks like it's a vim issue from your bisecting

Changed in nautilus (Ubuntu):
status: Incomplete → Invalid
Changed in gvfs (Ubuntu):
status: New → Invalid
importance: Undecided → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

Is that still an issue in focal?

Revision history for this message
Adam Novak (interfect) wrote : Re: [Bug 1813679] Re: vim-gtk can no longer save to non-group-writable files in GVFS SFTP mounts in 18.04

I haven't upgraded to Focal yet, but it's still an open issue upstream: https://github.com/vim/vim/issues/5237

May 20, 2020 5:49 AM, "Sebastien Bacher" <email address hidden> wrote:

> Is that still an issue in focal?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1813679
>
> Title:
> vim-gtk can no longer save to non-group-writable files in GVFS SFTP
> mounts in 18.04
>
> Status in gvfs package in Ubuntu:
> Invalid
> Status in nautilus package in Ubuntu:
> Invalid
> Status in vim package in Ubuntu:
> New
>
> Bug description:
> In Ubuntu 16.04, with gvim 7.4.1689, I can open files over GVFS SSH
> mounts (by going to `ssh://wherever` in the address bar in the file
> browser and double-clicking on the file), edit them, and save them.
>
> In Ubuntu 18.04, when I install `vim-gtk` and try to do the same
> thing, I can open the files just fine, but when I try to save them I
> get a message that Vim "Can't open file for writing".
>
> If I check out the Vim source tree and build and install vim
> v7.4.1689, which is what Xenial is shipping now, and use *that* gvim
> on Ubuntu 18.04, I can save over SSH mounts. I can also save fine from
> gedit.
>
> Something is wrong with the gvim shipping with 18.04.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 18.04
> Package: vim-gtk (not installed)
> ProcVersionSignature: Ubuntu 4.15.0-44.47-generic 4.15.18
> Uname: Linux 4.15.0-44-generic x86_64
> NonfreeKernelModules: nvidia_modeset nvidia
> ApportVersion: 2.20.9-0ubuntu7.5
> Architecture: amd64
> CurrentDesktop: ubuntu:GNOME
> Date: Mon Jan 28 15:55:56 2019
> ProcEnviron:
> TERM=xterm-256color
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: vim
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1813679/+subscriptions

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.