3

My "Linux mint Debian edition" installation worked well until I used a live-CD to boot and then copied some files back and forth to and between the hard drive and a usb device. Now it says that it is starting up without access to the /user/home directory. it is starting with a temp "home", and I cannot access the files in the users "home' directory.

How do reset the access and permissions on the users directory space?

closed as unclear what you're asking by Gilles, slm, Renan, jasonwryan, Anthon Oct 13 '13 at 5:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • We can't help you with so little information. What files did you copy back and forth? What are the exact messages (there's no /user/home directory)? – Gilles Oct 13 '13 at 1:08
  • Please add the output of sudo ls -la ~ to your question. – michas Oct 13 '13 at 1:29
1

An "usb device" usually contains some (windows) FAT filesystem, which does not know about users and permissions. If you move a file from you home directory to that usb device, the file will loose all information about owner and correct permissions. If you copy it back to your home directory it will be given some "random" owner and permission. The files probably belong to root now.

One way to set everything back is restoring your latest backup. - if you have one.

Alternatively you can fix it manually. You should be able to fix the owner with sudo chown -R $USER /home/$USER/. That should already be enough to log in again.

Then there are probably still buggy permissons. (Lots of x when doing ls -l.) You can use chmod to fix those. The best thing you can probably do is find ~ -type f -exec chmod a-x {} \; to fix most of the permissions.

0

I think you mean /home/user, where user is your username. If so, after logging in, open a terminal and run this command:

sudo chown -R user:user ~/

Change user for your actual username. This should reset the permissions of all files and folders in your home directory.

I just tested this on my LMDE install and on my system, I can actually log in graphically despite the error message. If you cannot, hit Ctrl Alt F1, log in from the command line and run the same command. Then, press Alt F8 to get back to the GUI.

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