2

I have completely the same problem as the guy in this question. So basically I am using nano somefile.txt editing it and then permissions denied because I forgot to use sudo. The only difference from the question is that I am using nano and therefore accepted solution does not work.

Is there anything similar for nano?

0

1 Answer 1

3

The simplest solution is to save the current content to a different file (best within your home directory, say ~/mytemporary-savefile), then exit nano.

After that you copy the saved file over the original file with sudo cp ~/mytemporary-savefile /etc/somefile.txt

Not the answer you're looking for? Browse other questions tagged .