1

I'm trying to create a directory in my home directory and I'm getting a permission denied warning. I am in /home/User/ as most solutions suggest. I'm also aware that I could use:

sudo mkdir

I also discovered in working around the problem that I can no longer use mv, cp, or rm without the sudo command. I was able to run all of these commands without problem before I added myself to the sudoers file. Did I remove myself from some permissions somehow?

Thanks

2
  • 2
    Please edit your question to include the outputs of whoami, id -nG, and ls -ld $HOME $PWD Oct 25, 2016 at 23:35
  • @steeldriver I tried Aaron's suggestions before I got to this. whoami returns user name and id -nG returned: Username, and sudoers group. Both of these were the same before I tried Aaron's solution. I assume the permissions shown with ls -ld are different now
    – Arland
    Oct 26, 2016 at 2:26

1 Answer 1

0

Try running sudo chown $(whoami) ~ and also sudo chmod -R u=rwx ~. This should set your home directory as owned by you and give yourself all permissions.

2
  • That worked. Thanks. Any idea how I would have lost the permissions in the first place?
    – Arland
    Oct 26, 2016 at 2:20
  • You probably just accidentally ran a command that you shouldn't have. I doubt this could've been anything other than a manually-caused accident. Oct 26, 2016 at 3:10

You must log in to answer this question.

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