you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 2 years ago (2 children)

I'm not sure if that's the joke and it flew over my head but isn't editing with sudo what you should be doing anyway if it's a system level file? You shouldn't change permissions unless the file is actually supposed to be owned by your user.

  • source
  • hideshow 2 child comments
  • [–] 5 points 2 years ago (1 child)

    You are supposed to run sudoedit.
    This command creates a temporary copy, opens it in you editor of choice and overwrites the protected file when the temp file changes.
    That way the editor doesn't run as root.
    You can see the difference if you run shell command, like whoami, in vim.

  • source
  • parent
  • hideshow 1 child comment