As usual I am confused, but I thought I would stop here first before I mess it up.
I copied my home directory onto an external harddrive before my laptop went away to have a new SSD fitted.
I now have my laptop back and I have installed Leap 15.4 and accepted the suggested partitions, I then read the documentation and chose to specify a /home directory.
In the past I have just copied the home directory back to the laptop and then run into problems, with user permissions in Libre Office and Thunderbird.
I have searched the internet, but Iâm not sure the suggestions are what I need.
So my question is how do I get the data off the external drive and onto the laptop?
Thank you in advance.
First you should tell us how you did that. Because that will decide the method how to copy it back.
I âctrl câ the folder and then âctrl vâ on the external drive. I used Dolphin programme. I checked that the hidden files had also been copied.
If you copy the folder you must restore to root or copy the contents of home on backup to /home . If you copied the contents of home you need to restore the files to home. You can tell by looking at your backed up files if you see only home on the backup device then you copied the folder If you see a bunch of files you backed up the contents of /home
I am a bit flabbergasted.
I am re-reading what you said in the first post where you talk about âmy home directoryâ and about /home. Which is already confusing, but I assumed that in all cases you wanted to talk about the /home directory (which contains all file of all normal users).
Now what did you copy with Dolphin? /home or /home/[the-username]?
And please understand that copying of a frozen (and thus internal correct) userâs home directory can only be done when that user is not logged in?
In general, when one wants to save the contents of /home, that is to be done when no normal users are logged in and of course it is to be done by root from the console.
And when you have permission problems, you probably have owner problems. To me it looks as if you have not the same UID as on the earlier system.
In short, I am fabbergasted and can only makes guesses at what you did.
Iâm really sorry that my brain works in this way.
I plugged in my external drive. I opened Dolphin and created a folder on the external drive. I then clicked on âHomeâ on the left side bar and then went up one level. The window shows one folder with my name. I right click on the folder and ctrl c and then ctrl v in the newly created folder on the external drive. Then the internal drive in my laptop was changed to a SSD. Now I want to move everything back to the SSD.
When I installed I used the suggested partition, but after reading the documentation, I repeated it and chose to have a /home.
With the external drive mounted somewhere, examine ownership of the files on it by number: ls -n. Do the UID and GID numbers all match the same command in your current homedir? If not, the ones on the external should be changed to match, so as to facilitate using Dolphin to copy them back. If you donât, you may find yourself up against permissions frustration caused by the non-ownership of the files on the external. Names donât own anything. Numbers do. Names are just aliases to numbers. When installing rather than upgrading, Newly created name aliases are subject to being assigned different numbers from last time.
The problem is the âIâ here. The system does not know that âIâ. The system only knows users. And you were apparently logged in as nappy, then nappy copied /home, but /home is not owned by nappy at all. /home is owned by root and should be copied by root. And root does never login in a the GUI desktop and thus cannot use Dolphin at all. Also, as I said above, there should be no normal user (including nappy) be logged in when you make a copy of all in /home, then you are trying to hit a moving duck.
You approached this as a user action. Which it is not. It is a system manager (root) action. Probably you may have used MS Windows earlier, but Unix/Linux is not MS Windows. it is a multi-user, multi-session operating system. As long as you do not internalize the consequences, you will have problems like this.
Then you talk about âexternal driveâ. Again this is a typical MS Windows term. It does not say much. I assume that there is a file system on that device, or on a partition on that device. It is important that that file system is a Linux file system, thus not FAT, NTFS or similar. You did not explain anything about that, thus this warning.
With the KDE Plasma Dolphin application, a âsimpleâ copy actually performs a âcp --archiveâ âŚ
- In other words, all the Linux / UNIXÂŽ file attributes are copied to the target device.
Provided that, the target device has a Linux File System on it âŚ
- If, the target device has a File System which doesnât support Linux / UNIXÂŽ file attributes then, the Linux file attributes associated with the source files will be lost.
This will happen if, you use an USB device (Thumb-Drive / Stick) with a default Microsoft File System on it âŚ
Happy Christmas!
So I have worked out how to do this.
drwxr-xr-x 2 1000 100 6 Mar 15 2022 bin
drwxr-xr-x 2 1000 100 65 Dec 20 19:24 Desktop
drwxr-xr-x 2 1000 100 6 Dec 20 19:24 Documents
drwxr-xr-x 2 1000 100 6 Dec 20 19:24 Downloads
drwxr-xr-x 2 1000 100 6 Dec 20 19:24 Music
drwxr-xr-x 2 1000 100 6 Dec 20 19:24 Pictures
drwxr-xr-x 2 1000 100 6 Dec 20 19:24 Public
drwxr-xr-x 2 1000 100 6 Dec 20 19:24 Templates
drwxr-xr-x 2 1000 100 6 Dec 20 19:24 Videos
This is from the SSD (I think)
total 4
drwxr-xrwx 9 1000 100 4096 Dec 1 21:15 07e9fb2c-eeba-4b30-b9da-adaa8c2a5e5d
This is from the external hard drive. They are not the same?
I have a folder containing a bunch of files.
Happy Christmas! I feel like the bee who flies around and doesnât know the physics states it shouldnât beable to fly
Okay, I am off work until next Wednesday. For once, this isnât a mad panic where I have to have sorted it out yesterday. The internal hard drive on the laptop was changed before it died. I really do have some time free to get my head around this. Yes, I started off with Microsoft, but after several years became so frustrated I ended the relationship. I have to hold my hand up and say I havenât learnt much about linux. This is because for the most part it works efficiently year after year.
If you have time, I would be most grateful if you would point me in the direction of some simple reading to explain ârootâ, âhomeâ and why I am able to do something you say I shouldnât beable to?
I would also like to learn how to backup my data properly, as I use the same cut and paste method.
Mmm! How would I know that? I have had the external drive for sometime, but I believe I did format it, before I put anything on it.
I know this isnât the right place, but I was nappy501, I donât have my email up and running so I cannot access it. I also have nappy 5011, going to a webmail address and I am unable to access it on the new forum. So I am now nappy5012 going to a different webmail address or I would have responded on Tuesday if I could have accessed the forum.
If you were to open a KDE Konsole window and execute âlsblk --fsâ youâll see each and every File System currently present on your system.
The KDE Info Center supplies the same information in the âDevice Information Moduleâ â âStorage Drivesâ but, youâll have to click on each and every partition to see which File Systems are present âŚ
Thank you, Iâve learnt something new. Yes, the external drive has a linux file system.
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
ââsda1
ââsda2 btrfs 691d5113-e1a7-458f-9cfa-b8dbc13932e4 147.8G 6% /var
â /opt
â /srv
â /usr/local
â /boot/grub2/i386-pc
â /tmp
â /root
â /boot/grub2/x86_64-efi
â /.snapshots
â /
ââsda3 swap 1 9c52a9f8-f41a-47bf-981f-8da58cefd286 [SWAP]
ââsda4 xfs 24fdbe18-115e-430a-bac8-4ec71a377705 286.1G 0% /mnt
/home
sdb
ââsdb1 ext4 1.0 07e9fb2c-eeba-4b30-b9da-adaa8c2a5e5d 567.8G 33% /run/media/janet/07e9fb2c-eeba-4b30-b9da-adaa8c2a5e5d
sr0
You have hit the point which makes Linux ânot so easyâ as the competition â Redmond and Cupertino (with Cupertino being the largest in terms of revenue ⌠) â
- Because Linux (and UNIXÂŽ) support so many File Systems, this makes life for newcomers not as easy as it could be âŚ
But, on the other hand, learning the needed tools â most of which are Command Line tools â isnât, as you have found out, at all difficult.
I have gone away and done some reading. The user and group are the same. But when I open a file from the home data on the external hard drive it is read only? I presume when I copy the data back to the SSD it will still be read only? What am I missing?
Also what does the 9 denote?
Please always copy/paste things complete, starting with the line with the prompt and command, ALL following output, up to and including the line with the new prompt. Else we have no idea what you are doing to get that output.
Also, please do not do story telling about users and groups that are the same, or of permissions you see somewhere, but give the facts by posting commands with output, in this case probably ls -l commands.
Iâm really sorry I was referring to my previous post above.
However the output from my SSD now looks like this
ls -n
total 0
drwxr-xr-x 1 0 0 1732 Dec 29 08:25 bin
drwxr-xr-x 1 0 0 1262 Dec 20 20:29 boot
drwxr-xr-x 21 0 0 4540 Dec 30 18:50 dev
drwxr-xr-x 1 0 0 5056 Jan 2 18:45 etc
drwxr-xr-x 3 0 0 19 Dec 20 19:23 home
drwxr-xr-x 1 0 0 100 Dec 20 19:16 lib
drwxr-xr-x 1 0 0 2984 Dec 20 20:29 lib64
drwxr-xr-x 3 0 0 19 Dec 20 19:23 mnt
drwxr-xr-x 1 0 0 0 Mar 15 2022 opt
dr-xr-xr-x 304 0 0 0 Dec 20 19:24 proc
drwx------ 1 0 0 108 Jan 2 19:15 root
drwxr-xr-x 45 0 0 1200 Dec 20 20:31 run
drwxr-xr-x 1 0 0 3796 Jan 2 18:45 sbin
drwxr-xr-x 1 0 0 0 Mar 15 2022 selinux
drwxr-x--- 1 0 0 64 Jan 2 18:45 .snapshots
drwxr-xr-x 1 0 0 22 Dec 20 19:16 srv
dr-xr-xr-x 13 0 0 0 Dec 20 19:24 sys
drwxrwxrwt 1 0 0 1514 Jan 2 19:15 tmp
drwxr-xr-x 1 0 0 110 Dec 20 19:14 usr
drwxr-xr-x 1 0 0 110 Dec 20 20:27 var
So I really donât understand why it has changed?
Yes, knowing the numeric UID and GID values can be useful in specific Use Cases but, what really matters is the User and Group associated with those ID values â
- If, for each UID value and each GID value, neither a User nor a Group has been defined â for stand-alone systems in /etc/passwd and /etc/group â then, knowing the UID and GID values will not be much help when it comes to sorting out issues with permissions âŚ
For your case and, Home directory permissions, youâll have to check the owner of the files (and the files known as âdirectoriesâ) in each userâs Home directory â
- If the files located in a Userâs home directory are not owned by that User then, the affected User will be allowed, at most, only Read access to those files.
- And, donât forget the âhiddenâ files â those files prefixed by a â.â âŚ
[SOLVED] Sort of.
I renamed the user data to nappy1, I then cut and paste the folder to /home. So I now have two folders /home/nappy and /home/nappy1. I used the chown command to change the user and group for nappy1.
So the folder nappy has a little house on it and when I go to home in dolphin it takes me to /home/nappy, not /home/nappy1. I have done some reading and I think I have to do something to etc passwd, but as I donât understand I am leaving it alone.
It will be clunky to use, but it is useable. Thank you all for your assistance.