4

I have lubuntu 12.04, and I installed emacs using:

sudo apt-get install emacs

Whenever I try to edit/make a file, however, nothing shows up unless I run it under sudo. So I need to type in

sudo emacs "filename" 

everytime. Can anyone help me out? This is really annoying.

1
  • Is it system file?
    – Tachyons
    May 8, 2012 at 1:56

2 Answers 2

6

This might be a permission issue on the current directory you were working on. And the file you created is not your ownership since you send a sudo command on it.

Try to check your current directory's permission.

If you don't have permission to it you can have

$ sudo chmod -R 755 Your_Directory/

or

change the ownership of that directory.

$ sudo chown -R user Your_Directory/

Next time you create a file just type

$ emacs "Your File in Here"
2
  • 3
    Well the directory I was working in had the correct permissions. What I had to do was sudo chmod -R 755 /home/username/.emacs.d/ I don't know what is up with that directory, but when I did that, it worked.
    – de1337ed
    May 8, 2012 at 2:17
  • @de1337ed You may have created it as root or had root privileges at the time.
    – haziz
    Dec 6, 2012 at 8:58
4

chown and chgrp -R on the .emacs.d directory. It looks like it is owned by root by default for some reason,.

0

You must log in to answer this question.

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