Downloaded all old files from hard drive to new ubuntu computer. I did not change the user-name from the default OEM user-name, but changed it after. All my folders are no longer accessible, how do I retrieve them?

  • You have to log in as the root user which can be done by going into the terminal and typing sudo -i and then type your root password. – Alex Lowe Dec 1 '15 at 0:34

Let's say you have a directory called transfer-dir with all of your transfered files in it and your new user's name is penguinfan.

You would run the following to change the ownership of the files to your new user:
sudo chown -R penguinfan: transfer-dir


  • is needed to be able to change ownership of another user's files


  • changes ownership of files


  • changes ownership recursively


  • This is short for penguinfan:penguinfan, which changes the user and group of files.


  • tells chown to use change ownership of/in the transferdir directory.

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.