I am using Ubuntu 16.04 VM image.I want to edit a file which is owned by root.I tried using sudo chown as well chmod to change the permissions.It was denied.I also tried mount and remount, gksu nautilus, sudo gedit,sudo nano as well as vim editor.Nothing worked.The file read and modify permission can be done only by root owner.The file was installed using snap.Please help me out how to edit the file.
Installed by snap i.e. a file contained in
/snap/<snapname>/<revision>/ somewhere? Snaps are squashfs images, which by definition are read-only. No amount of permissions will change that, I'm afraid.