Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It seems to me that I have the proper permissions, so why can't I create directories in my $HOME directory?

dotancohen@neptune:~$ whoami
dotancohen@neptune:~$ pwd
dotancohen@neptune:~$ ls -l .. | grep dotancohen
drwxr-xr-x 16 shelly shelly  4096 Jul  2 15:02 dotancohen
dotancohen@neptune:~$ mkdir test
mkdir: cannot create directory `test': Permission denied
share|improve this question
Who is shelly? – Takkat Jul 5 '12 at 7:30
Are you the only user of your PC. – atenz Jul 5 '12 at 7:49
Shelly is another user of the computer, the user from which I sudo useradd -m dotancohen. I cannot believe that I did not notice that she owns my home! – dotancohen Jul 5 '12 at 12:23
up vote 5 down vote accepted

Somehow your home directory is owned by user shelly. If you have sudo privileges, you can change it back:

sudo chown -R dotancohen:dotancohen /home/dotancohen
share|improve this answer
We also need to find out why shelly owns dotancohen's HOME - this did not happen by accident ;) – Takkat Jul 5 '12 at 7:40
Note: the -R in that command will change ownership of all files within your home directory, too. Normally, that is exactly what you want since you want the files in your home directory to belong to you. But just in case for some reason it isn't, it's probably worth pointing this out. – thomasrutter Jul 5 '12 at 7:42
@Takkat if I had to guess, it may be that the OP wanted to change the name of her (or his?) user account, but instead of renaming it, created a new one and renamed the home folder to move everything over. Which while not being all that harmful, is not necessarily the easiest way to do it. – thomasrutter Jul 5 '12 at 7:45
Sure. One possibility is that OP reinstalled the system recently keeping /home intact (on a separate partition) - in this case users in the new system might have got different user IDs. If this is not the case then I'd ask Shelly why the permissions have changed... If the OP does not know who Shelly is then yeah, this is a problem. – Sergey Jul 5 '12 at 7:47
Thank you, shelly was the user from which I created dotancohen. I cannot believe that I looked at the permissions but not at the owner/group! – dotancohen Jul 5 '12 at 12:24

Well obviously you don't own your own home directory but shelly does. You may only execute (or read execute; if you are in the same group as shelly is). Therefore you cannot create a directory. Sudo can though; so sudo mkdir test should work. You might want to reown this directory for your user dotancohen as superuser. See mapage chown for that.

share|improve this answer

Your Answer


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.