gedit snap fails to save or open files in miscellaneous directories including dot-folders, ~/bin, and system folders.

Bug #1897562 reported by Paddy Landau
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Triaged
Low
Unassigned

Bug Description

The snap version of gedit prevents viewing and editing files outside a strictly limited set of folders. For example, it cannot change files in standard folders ~/bin, ~/.local, ~/.config, ~/.ssh, or standard files such as ~/.bashrc or ~/.profile. Even "sudo -H gedit /etc/fstab" doesn't work. Using sudoedit doesn't work, as access to /var/tmp is rejected.

EDIT: ~/bin is now available to gedit. EDIT: Nope, not any more.

As there is a bug in the non-snap versions [1], the snap version is important, but sadly it is unusable for a certain number of cases.

I understand that the only solution is to make gedit available in classic confinement.

Please would you do this.

Thank you

[1] https://gitlab.gnome.org/GNOME/gedit/-/issues/361

Tags: snap
description: updated
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, what error do you get when trying to edit a file in ~/bin? Standard folders in the userdir should be working. Restriction to dot directories is a know limitation though...

Changed in gedit (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
tags: added: snap
Revision history for this message
Paddy Landau (paddy-landau) wrote :

@seb128 — I can load files from ~/bin, but when I try to save, I get this error (screenshot attached):

Could not save the file "/home/paddy/bin/myscript".
You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again.

The same is true for others such as ~/.local/ or ~/.bashrc, and for system files loaded with "sudo -H gedit".

Revision history for this message
Paddy Landau (paddy-landau) wrote :

@seb128 — Correction to my previous post: For system folders, I cannot even load files.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gedit (Ubuntu) because there has been no activity for 60 days.]

Changed in gedit (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Paddy Landau (paddy-landau) wrote :

Please don't expire this request.

The problem still exists in full.

Changed in gedit (Ubuntu):
status: Expired → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

Using desktop portals would give access to the dot files, the fileselector changes needed were reverted in https://gitlab.gnome.org/GNOME/gedit/-/commit/74e0be7e though and need some extra work before landing again. While that would solve the described problem it would probably not cover people wanting to edit system files using sudo which would work under classic

Changed in gedit (Ubuntu):
status: New → Triaged
summary: - gedit needs classic confinement
+ gedit snap fails to open fails in user dot directories
summary: - gedit snap fails to open fails in user dot directories
+ gedit snap fails to save or open files in miscellaneous directories
+ including dot-folders, ~/bin, and system folders.
description: updated
description: updated
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.