Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What is the most simple, smoothiest way to get control over the old userfiles (documents and so) on the new fresh install? I've always ended up just to recreate the old files if there has been complains about not owner of the file, or so, bcause not knowing for sure what to do. Afraid that breaking up something, or like losing files.
I've tried to search simple answer but instructions have been bit complex.
Like if the files are on usb stick memory or external usb disk, what is the correct procedure?
First backup all of your files onto a usb memory stick or and external hard disk drive.
Perform the fresh installation of the distro and than just plug in the usb memory stick or external HDD and copy all of the files to the new installed system.
But i always get these owner of file problems. So it's not normal to get them, right? How do solve the owner things without always sudo to use the file? It's not always every file but there's often some files, documents (created by myself on old system) which require owner change, or sudo them to edit.
Like i had some C++ programs coded by me, all of those were under previous ownership.
2. you can on your next "distro" install is split your system, giving /home its own partition. this way if you ever do re-install, or change distors, you can keep your home then just attach it to the next install by pointing to its mount point during installation.
moduser or usermod
chown
are commands useful in controlling your file permissions. search on them, and get yourself comfortable in using them.
When it comes to owners and permissions remember there is one gotcha that can bite. The system does not use usernames for files, but uids and gids. The passwd and group files in /etc provide the names we are so used to. If your new system has different user ids and group ids then then your users will have problems. So step one is to make sure the user/uid and group/gid lists are the same. Then make sure your method of backing up and copying maintains the original uids and gids. rsync can be useful there.
What is the most simple, smoothiest way to get control over the old userfiles (documents and so) on the new fresh install? I've always ended up just to recreate the old files if there has been complains about not owner of the file, or so, bcause not knowing for sure what to do. Afraid that breaking up something, or like losing files.
I've tried to search simple answer but instructions have been bit complex.
Like if the files are on usb stick memory or external usb disk, what is the correct procedure?
There is no "correct" procedure, but in my experience, the easiest way is to make sure the file permissions are by uid and gid instead of username and groupname.. That way you can always use the same user id and group id and the permissions carry over.
Regarding file "transfer" to the new distribution, I would recommend always having /home on a separate partition, and simply remount this under /home in the new distro to keep all the files etc from the old system.
Personally I tend to copy all of my files over to my new home folder, then run the following:-
PHP Code:
cd /home chown -R <username> <username>
This sets every file in your user folder and every sub-folder to be owned by your user. HOWEVER, Ubuntu at least, has started sneaking files into the home folder, which are not owned by the user, so there is now potential for things to go very wrong, following this. In order to get around this, I now pick and choose which files & folders to copy over, which is less lazy, less prone to going wrong, and leads to a much cleaner home (I have previously found stray folders from programs which I haven't used in 5 years).
EDIT: oh, and if you are installing a different version of the OS, overwriting the defaults on a good few folders can cause things to not work properly. This will vary depending on the OS and Desktop, but dconf is one I don't bother copying over.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.