Ubuntu core - nano permission denied for /etc/netplan

Using ubuntu core trying to edit netplan config
Trying to edit ip’s in /etc/netplan/00-snapd-config.yaml

nano editor outputs [ Error reading /etc/netplan/00-snapd-config.yaml: Permission denied ]

nano was installed with sudo snap install nano
Is there a way to edit /etc configuration files with a snap store text editor?

Since you’re on Ubuntu Core, nano is strictly confined. It wouldn’t have access to system files. Can you edit a copy in your home directory, save it, then copy it back?

Unfortunately that didn’t work, also tried changing owner,group,and mode, tried sudo -s and nano still receives permission denied.

Did you connect the home interface? I don’t think that’s autoconnect on Ubuntu Core.

previous post is incorrect, this command works. plug/slot has to be manually connected
sudo snap connect nano:home :home

1 Like

alternatively you could have installed nano with the --devmode flag to make it run unconfined (connect all its interfaces anyway, else it spams your log with “ALLOWED” messages)