I installed a snap package in Ubuntu 18.04 package and I want to edit one of its files using root account. First I switched to root with su
, but then when I opened file in nano it tells me:
[ File '/snap/phpstorm/36/bin/phpstorm64.vmoptions' is unwritable ]
Then I tried this:
root@elahe-VPCEA31FX:/home/elahe# sudoedit /snap/phpstorm/36/bin/phpstorm64.vmoptions
after above command the file opened in nano, but after making changes and saving with Ctrl+O and after exiting with Ctrl+x I got this message:
sudoedit: unable to write to /snap/phpstorm/36/bin/phpstorm64.vmoptions: Read-only file system
sudoedit: contents of edit session left in /var/tmp/phpstorm64XXRCQzZi.vmoptions
I even tried to change the permissions of the file with this command:
root@elahe-VPCEA31FX:/home/elahe# chmod 755 /snap/phpstorm/36/bin/phpstorm64.vmoptions
and got this:
chmod: changing permissions of '/snap/phpstorm/36/bin/phpstorm64.vmoptions': Read-only file system
It is really amazing that the root user cannot edit a file! Is this a bug?