Skip to main content

BACKGROUND

Background

I'm working on my personal VPS configured mostly for learning sysadmin and personal projects. Have run up against an issue where my non-root user could only create/edit files in emacs by using sudo command. This is not an issue with directory permissions since I can create files with touch without sudo.

  • Can't recall, but emacs may have been initially installed by the root user.
  • User was created and added as follows:
  • root@hadron:~# adduser my_user
  • root@hadron:~# addgroup admin
  • root@hadron:~# adduser my_user admin

SPECIFICS

Specifics

Running a command like emacs newfile.txt would always open a blank document that couldn't be saved, and noted the following in the file path at the bottom of the terminal: File exists: /home/my_user/.emacs.d/

Checking that .emacs.d file, the permission was as follows:

  • drwx------ 3 root root 4096 2012-03-26 08:07 .emacs.d

Changing the permission of the .emacs.d file to allow anyone to access it resolved the situation, but that doesn't seem like the proper solution:

  • chmod 777 ~/.emacs.d
  • drwxrwxrwx 3 root root 4096 2012-03-26 08:07 .emacs.d

What is the appropriate way of addressing this?

BACKGROUND

I'm working on my personal VPS configured mostly for learning sysadmin and personal projects. Have run up against an issue where my non-root user could only create/edit files in emacs by using sudo command. This is not an issue with directory permissions since I can create files with touch without sudo.

  • Can't recall, but emacs may have been initially installed by the root user.
  • User was created and added as follows:
  • root@hadron:~# adduser my_user
  • root@hadron:~# addgroup admin
  • root@hadron:~# adduser my_user admin

SPECIFICS

Running a command like emacs newfile.txt would always open a blank document that couldn't be saved, and noted the following in the file path at the bottom of the terminal: File exists: /home/my_user/.emacs.d/

Checking that .emacs.d file, the permission was as follows:

  • drwx------ 3 root root 4096 2012-03-26 08:07 .emacs.d

Changing the permission of the .emacs.d file to allow anyone to access it resolved the situation, but that doesn't seem like the proper solution:

  • chmod 777 ~/.emacs.d
  • drwxrwxrwx 3 root root 4096 2012-03-26 08:07 .emacs.d

What is the appropriate way of addressing this?

Background

I'm working on my personal VPS configured mostly for learning sysadmin and personal projects. Have run up against an issue where my non-root user could only create/edit files in emacs by using sudo command. This is not an issue with directory permissions since I can create files with touch without sudo.

  • Can't recall, but emacs may have been initially installed by the root user.
  • User was created and added as follows:
  • root@hadron:~# adduser my_user
  • root@hadron:~# addgroup admin
  • root@hadron:~# adduser my_user admin

Specifics

Running a command like emacs newfile.txt would always open a blank document that couldn't be saved, and noted the following in the file path at the bottom of the terminal: File exists: /home/my_user/.emacs.d/

Checking that .emacs.d file, the permission was as follows:

  • drwx------ 3 root root 4096 2012-03-26 08:07 .emacs.d

Changing the permission of the .emacs.d file to allow anyone to access it resolved the situation, but that doesn't seem like the proper solution:

  • chmod 777 ~/.emacs.d
  • drwxrwxrwx 3 root root 4096 2012-03-26 08:07 .emacs.d

What is the appropriate way of addressing this?

Source Link
CdrXndr
  • 43
  • 1
  • 3

Permission issue with emacs for non-root user (Ubuntu 11.10)

BACKGROUND

I'm working on my personal VPS configured mostly for learning sysadmin and personal projects. Have run up against an issue where my non-root user could only create/edit files in emacs by using sudo command. This is not an issue with directory permissions since I can create files with touch without sudo.

  • Can't recall, but emacs may have been initially installed by the root user.
  • User was created and added as follows:
  • root@hadron:~# adduser my_user
  • root@hadron:~# addgroup admin
  • root@hadron:~# adduser my_user admin

SPECIFICS

Running a command like emacs newfile.txt would always open a blank document that couldn't be saved, and noted the following in the file path at the bottom of the terminal: File exists: /home/my_user/.emacs.d/

Checking that .emacs.d file, the permission was as follows:

  • drwx------ 3 root root 4096 2012-03-26 08:07 .emacs.d

Changing the permission of the .emacs.d file to allow anyone to access it resolved the situation, but that doesn't seem like the proper solution:

  • chmod 777 ~/.emacs.d
  • drwxrwxrwx 3 root root 4096 2012-03-26 08:07 .emacs.d

What is the appropriate way of addressing this?