LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-17-2018, 02:13 PM   #1
Tagiga
Member
 
Registered: Mar 2017
Posts: 37

Rep: Reputation: Disabled
Question Transfering files to new system, how to?


So,

if i reinstall a distro/install new one,

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?
 
Old 11-17-2018, 02:19 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
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.
 
Old 11-17-2018, 02:49 PM   #3
Tagiga
Member
 
Registered: Mar 2017
Posts: 37

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Tagiga; 11-17-2018 at 02:52 PM.
 
Old 11-17-2018, 02:51 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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.

Last edited by BW-userx; 11-17-2018 at 02:53 PM.
 
Old 11-17-2018, 04:06 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Permissions can really turn you around until you understand them.
If you haven't already take a look here:

https://www.linux.com/learn/understa...le-permissions
 
Old 11-17-2018, 08:03 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124
BW-userx's suggestion is excellent. Since I started using a separate /home, life with upgrades and even installs of new distros has been much easier.
 
Old 11-18-2018, 03:55 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Tagiga View Post
But i always get these owner of file problems.
show us.
it's probably an easy fix, but you need to show us first.
get busy with a terminal; open the containing folder in a terminal and issue
Code:
ls -al
 
Old 11-18-2018, 04:11 AM   #8
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
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.
 
Old 11-18-2018, 04:52 AM   #9
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,824
Blog Entries: 17

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Quote:
Originally Posted by Tagiga View Post
So,

if i reinstall a distro/install new one,

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.
 
Old 11-19-2018, 09:08 AM   #10
alexpaton
Member
 
Registered: Jul 2009
Distribution: Ubuntu & ClearOS
Posts: 163

Rep: Reputation: 47
Personally I tend to copy all of my files over to my new home folder, then run the following:-
PHP Code:
cd /home
chown 
-<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.

Last edited by alexpaton; 11-19-2018 at 09:12 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm over my head - need a cookbook for transfering system to new disks recneps_divad Linux - Server 13 12-18-2007 05:36 PM
Transfering files from a Windows machine to Linux qcoder Linux - General 4 10-10-2003 05:06 PM
Transfering files from a fat32 hd to a linux hd felipe_ced Linux - Newbie 4 08-18-2003 10:36 PM
Transfering Files form Linux to Windows Ricky22 Linux - Networking 6 06-09-2002 06:01 AM
transfering files with sshd and mindterm tyler_durden Linux - Security 2 08-01-2001 04:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration