[SOLVED] Setting Permissions after copy on dual boot

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Second Round
Level 2
Level 2
Posts: 85
Joined: Sun Feb 02, 2020 7:29 am
Location: USA

[SOLVED] Setting Permissions after copy on dual boot

Post by Second Round »

I could use some guidance on setting permissions. I've phasing out my use of Windows 7 by setting up Linux Mint Xfce on a dual boot desktop machine. I'm the administrator, my wife is a regular user.

One of the things that I did was to copy over her files from the Windows side of the hard disk ("OS"), into her LM home folder. I did this while logged in as myself, but the folders and files appear to have arrived a variety of ownership and permissions. In some cases she can't write to the folder when logged in has herself. Sometimes she owns the folder or file, other times, root does. What steps should I take to set up appropriate permissions for her home directory, its folders (documents, pictures, videos, music, etc) and files? I'd like to have her be able to read and write to these folders, and (if relevant) be able to double-click an icon (like a jpg or libre office file) and have it open in the default application.

Also, it appears I erred in getting rid of empty folders from copying over her windows folders into her home directory. I deleted Desktop and Templates, not realizing they were default folders under LM Xfce. I could not find them in her trash or mine, and initially when I recreated them, they were owned by root. So I got rid of those, logged in as her, and recreated them there. But I'm not sure they are right. They seem to have the right permissions now, but the folder icons aren't what they used to be. They are blank icons. The Desktop one used to look like the the minimize icon in the system tray, and the Templates one used to have a right triangle image in it (both in shades of green). Is there any reason these folders should be re-created by another means? I.e., might there be more wrong than just the icon appearance?

Thank you!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gittiest personITW
Level 12
Level 12
Posts: 4286
Joined: Tue May 28, 2019 4:27 pm

Re: Setting Permissions after copy on dual boot

Post by gittiest personITW »

In each user account that you are having problems with, run the following command from terminal:

Code: Select all

sudo chown -Rc $USER:$USER $HOME
Post back with the result.
If you have a Timeshift snapshot, you could also go back to before the problem. The data should still be safe unless you have changed the TS settings.
Second Round
Level 2
Level 2
Posts: 85
Joined: Sun Feb 02, 2020 7:29 am
Location: USA

Re: Setting Permissions after copy on dual boot

Post by Second Round »

I was not able to run that command when logged in as my wife. It asked for her password, and of course she can't run that as root.

Should I run it in my own terminal, and if so, how should the command look? For instance if her username was jane, should it be

sudo chown -Rc jane:jane home

?

Thanks!

PS I think I do have a timeshift that would work - but it was soon to roll off! I've upped the number to save so it won't disappear too soon. :)
gittiest personITW
Level 12
Level 12
Posts: 4286
Joined: Tue May 28, 2019 4:27 pm

Re: Setting Permissions after copy on dual boot

Post by gittiest personITW »

Thats fine.

Could you temporarily enable her account to be an admin in Users and Groups and try it from her account again as it is.
That is assuming you copied all her files into her /Home/jane directory, and not somewhere else.

ps
Don't run that command from your account with jane:jane or that'll confuse the hell out of everyone and you might break the interweb. :(
Second Round
Level 2
Level 2
Posts: 85
Joined: Sun Feb 02, 2020 7:29 am
Location: USA

Re: Setting Permissions after copy on dual boot

Post by Second Round »

Thanks! I think that cured the permissions issue. I did have to change the filepath to /home/jane.

Not copying out result because it changed a huge number of files and folders, and produced a line report for each.

Did a timeshift restore but that did not change the look of her Desktop and Template icons back. Hopefully that's just a cosmetic thing.

BTW, her desktop has an icon for each folder in her home directory. I'm not sure how I did that or could undo it, but initially she had nothing on her desktop, or maybe just one icon (home, perhaps?) Any idea on that? I suspect these are just launchers, but I'm hesitant to mess with them because, well, if they're not, I may be deleting the folders themselves! But Templates is just empty and taking up space. Same with Public and one or two others.

Thank you again!
gittiest personITW
Level 12
Level 12
Posts: 4286
Joined: Tue May 28, 2019 4:27 pm

Re: Setting Permissions after copy on dual boot

Post by gittiest personITW »

I can't help with xfce desktop.
Give it a little longer, and if no one replies then it might be worth doing a separate post - or changing the title of this post.
Nice one.
Locked

Return to “Beginner Questions”