Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Is it system file? –  Tachyons May 8 '12 at 1:56
add comment

2 Answers

up vote 4 down vote accepted

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"
share|improve this answer
2  
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 '12 at 2:17
    
@de1337ed You may have created it as root or had root privileges at the time. –  haziz Dec 6 '12 at 8:58
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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