0

Is there a way to open a local file for editing as a root? I need to make some changes to a config file located at ~/.emacs.d/init.el, but the Emacs tells me that the buffer is read-only.

9
  • Note that you should not need root permissions to edit a file located under your home directory. Check what you're doing. Oct 5, 2017 at 20:17
  • Not if the owner of that file is root. Then it does not matter in which directory the file is located. Oct 5, 2017 at 20:23
  • 1
    That's my point: root should not own that file. You should fix that. Oct 5, 2017 at 20:30
  • 1
    Does the file exist? Have you or your administrator configured Tramp? Can you reproduce the problem when you start Emacs with emacs -Q ? Oct 5, 2017 at 20:43
  • 1
    @MadPhysicist: /sudo:: is tramp shorthand for /sudo:root@<host>:
    – phils
    Oct 5, 2017 at 21:08

0

Browse other questions tagged or ask your own question.