I was tired two days ago and I accidently deleted my home folder on my VPS. I just rmed it like a retard. Don't ask me why. It's the first time something like that happened in 3 years. I do not care about the data lost, I had nothing important in my home folder. So I don't care about any kind of recovery.

So I created a new home folder with "sudo mkdir /home/spazmic", then I "sudo chown spazmic:spazmic /home/spazmic" to give folder rights to my user. I still had access to the VPS, so I copied back the RSA key to my authorized keys folder to be able to reconnect so right now everything is acting like this incident never happened. When I "cd", I go back to my home folder so that's a good sign.

My question is : Is there something I forgot to do?

Thank you :)

  • you will need to use the -R flag when applying ownership using chown like so: sudo chown -R spazmic:spazmic /home/spazmic
    – mchid
    Mar 14 '15 at 22:14

Copy the contents from /etc/skel to your home directory (and fix the ownership of the copied files afterwards).

  • Amazing, I compared with my other VPS and it added the files that weren't there. Apparently those files are the files that goes in the home directory of a newly created user. Thank you!
    – Spazmic
    Mar 14 '15 at 21:45
  • Yes, that's exactly what /etc/skel is for.
    – MoonSweep
    Mar 14 '15 at 21:47

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.