0

This question already has an answer here:

Every time I try to edit a file in /etc I get "access denied".

I tried using different text editors and nautilus and I couldn't save or change any files there.

I don't understand. Am I not supposed to have this access?

What do I do now?

marked as duplicate by muru, Ravexina, Sumeet Deshmukh, user364819, Zanna May 23 '17 at 8:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    ONLY edit files in /etcif you know what you are doing. Files are quite sensitive in there. – Jacob Vlijm Apr 27 '14 at 12:34
1

Make sure you have root privilege.

Try:

sudo -H gedit /etc/file.txt
  • i made myself root, and do i have to install gedit – user274143 Apr 27 '14 at 15:20
  • i dd and it is workin – user274143 Apr 27 '14 at 15:27
  • "i made myself root" - So you are doing all your work as a user with root privileges? That's a really bad idea, you should su root if you need root access. – Skynet May 23 '17 at 8:05
0

You can have root access with the command

gksu nautilus

This gives you a GUI access of the files in root.But be careful with what you change in there.

  • gksu provided me with a warning that.. (gksu:4370): Gtk-WARNING **: cannot open display – user274143 Apr 27 '14 at 15:21
  • You are probably running this command as root, and root probably doesn't have an active desktop session. – Skynet May 23 '17 at 8:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.