Is it normal that I can't create directories in /home partition as a normal user?

Example:

user@pc:/home$ mkdir test

mkdir: cannot create directory ‘test’: Permission denied

Is that normal?

  • @ignis Please add your comment as an answer, so that mecropa can accept it, and question is marked as closed. – Bhavin Doshi May 2 '13 at 21:55
  • @bkd.online Ok, done – ignis May 3 '13 at 6:59
  • 2
    Mind that if you do this and in the future you feel the need to create a user "test" you might run into trouble. – Rinzwind May 3 '13 at 7:18
  • 2
    Why are you trying to create a directory under /home? If you're trying to create a new user with a home directory, there are better ways to do this. I do not recommend creating a directory under /home for any other purpose. – Flimm May 3 '13 at 8:16

Yes, it's expected, because your home is /home/user. /home is just the container for the home folders.

To be able to create a directory under the /home folder, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below:

cd /home

sudo mkdir <name>

enter image description here

  • Thx for that but the problem is that the owner of the directory is still root. the solution for now is chown -R username directory – mecropa May 2 '13 at 21:25
  • @mecropa: chown -R is evil, just saying... be careful with that command. It can brick your OS. – Takkat May 2 '13 at 21:33

Don't forget to change the ownership of the created folder of a normal user won't be able to access it. sudo chown user:group newFolder

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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