PDA

View Full Version : I deleted /home directory



manemis
January 19th, 2016, 03:55 PM
Hi I was about to make simbolic link my /home partition to /home under / partition. the problem is, I have tried this with gksu nautilus, but when I erased /home under /, the nautilus has turned off and I never can use nautilus(it sais I have no permission.)
I have backed up my original home directory, but now I cannot even login.
What shouls I do?

v3.xx
January 19th, 2016, 04:13 PM
As you discovered, you can't do that. You need to put things back like they were. You have a live dvd? With it you can use the live session to access the hdd.

manemis
January 19th, 2016, 04:20 PM
When I install ubuntu, I obviously made home patition apart, but it seems not linked home directory in /. There was another home directory in /. But I made /partition with only 20gb, so I must use the home partition already I've made. Can I replace it?Can't I?

oldfred
January 19th, 2016, 04:27 PM
If you already have /home then you can skip the initial copy commands. But this shows the entries required in fstab and other details:

To move /home uses rsync- Be sure to use parameters to preserve ownership & permissions
https://help.ubuntu.com/community/Partitioning/Home/Moving

manemis
January 19th, 2016, 04:59 PM
Thank you for your advice. But I remember that I made backup with only copy and paste in nautilus not rsync, then it means it does not have ownership and permissions?

oldfred
January 19th, 2016, 06:44 PM
Your ownership & permissions with /home can be reset. But system, not so much.
I think link shows that also.

Ubuntu /home is permissive:
https://wiki.ubuntu.com/SecurityTeam/Policies#Permissive%20Home%20Directory%20Access
sudo chown -R $USER:$USER /home/$USER
sudo chmod -R a+rwX,o-w /home/$USER

Note that -R is recursion. Never run on any system folders, or else you probably just have to reinstall and restore from backups.

manemis
January 20th, 2016, 04:32 PM
Thank you! all is well now.

oldfred
January 20th, 2016, 07:42 PM
You can change to Solved.

During install with a separate /home partition you have to use the Something Else install option, choose the /home partition, but be sure NOT to tick the format or else it erases it.