I have recently created a separate home partition following this tutorial https://help.ubuntu.com/community/Partitioning/Home/Moving. Since I’m still a newbie in the Linux (struggling to learn) I felt happy when every thing seemed to work smooth. How ever, I realised after a while that I had lost all permission to my subfolders in the my home folder. I still can read/write the files placed directly in /home/magnus but I'm denied access to any of the subfolders.

I just realised one more disturbing thing, probably related to home-partition story above:

When I try

cd ~/Music/

I get the message

bash: cd: /home/magnus/Music/: Permission denied

When I try:

sudo cd ~/Music/

I get the result

sudo: cd: command not found

Seems strange that the cd command have been lost?

What have I done wrong and is there a way to fix this?

btw: I use Ubuntu 12.04 LTS

Thanks for all the help! Magnus


A good command to run is

ls -la

This will show permissions, ownership, groups, and hidden files.

At this point you want to make sure the sub directories have the correct owner and permissions.

You can change the owner of folders and file recursively by doing this command

sudo chown -R magnus *

The * tells chown to change ownership of all files while the -R tells chown to do it recursively down through the file structure.

If you want to do this just on your home directory and all files and folders in it do this.

sudo chown -R magnus /home/magnus

This should give you permissions over the files if the owner permissions are set correctly.

Also check out chmod if the permissions are set correctly.

Here is a way better explanation then what I could give you in this https://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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