Two home folders and permissions

Archived topics about LMDE 1 and LMDE 2
Locked
idc

Two home folders and permissions

Post by idc »

Hi,
I have managed to end up with two home folders (because I mucked up the first when I restored all my files from my previous Mint 11 system and included backed up config files). Creating a new user solved that one, but now thanks to Unix permissions I find I cannot gain access to my files in the old home/Documents folder from the new user. I would like to simply copy across all the files from /home/old_user/ to /home/new_user and change their permissions from 'old_user' to 'new_user' so that I can access them. (After which I can delete the old_user account altogether.) Is there a straightforward way to do this? I thought I'd be able to nail it by copying across as root and then changing permissions, but doing that with a GUI was a. long-winded (the changing permissions only seemed to work for the folder and the next level down in the hierarchy) and b. doesn't seem to work for all files. (In particular I use a program called scrivener which appears to store all the files for a project in a folder called 'whatever.scriv'--I don't seem to be able to change any of the permissions in the crucial folders within this folder.)

I could simply restore again from the BackinTime backup to the new home folder. However the new_user has a different name to the old_user, so I am not sure that that would work. (Experimenting just now appeared to show that it does not, with the restored files having 'root' as the user.) Basically, there is, I hope, some set of commands that will allow me to access my work from the new, working new_user account. Any advice gratefully received.

Ian

UPDATE: I managed now to restore the key scrivener file I wanted to work on from BackinTime. Turned out the problem was I copied back into a filemanager window with superuser permissions (open because I'd been trying to copy across from the other home folder) instead of a regular filemanager window--hence the incorrect permissions issue. I would still be interested to know whether there is a straightforward way to copy all the files over from the other home folder whilst changing the permissions to work with the new user? Thanks. Ian
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
viking777

Re: Two home folders and permissions

Post by viking777 »

Code: Select all

sudo chown -R ian: /home/old_user
Is what I would try. (though you would have to substitute the correct username and folder address of course).
idc

Re: Two home folders and permissions

Post by idc »

Thank you. I'll (cautiously) try that out.
Much obliged for your response.
Ian
Locked

Return to “LMDE Archive”