access denied when copying home to a new partition

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Husse

access denied when copying home to a new partition

Post by Husse »

I came from Windows just to check Mint out, but was stuck with this lovely distro.
I did not read to much about partitioning and the like before installing, and definitely not what I've put in the Wiki on the subject :)
So, to make long story short I decided it was time to let "home" have a home on its own partition. There is a good description on how to do it here: http://ubuntu.wordpress.com/2006/01/29/ ... partition/
It seems to have helped a bunch of people.
(Note you have to change –null –sparse to --null --sparse -you find it in the copy command - changed here)
I mount the "home-partition-to-be" in the folder /mnt/newhome/ . (sudo mount -t ext3 /dev/sda6 /mnt/newhome) I try to copy the content of /home to the newly monted partition in /mnt/newhome/ but I get access denied all the way for /mnt/newhome/
The copy command used is:
find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome
Note: The guide has:find . -depth -print0 | cpio –null –sparse -pvd /mnt/newhome/
i.e. with a / in the end. Remove it - or you get double / in the destination. Not the solution to acces denied - tested it.
All commands are copied directly from the guide (and adjusted as mentioned above) so there should be no typos.
I've been staring at this for some time now so the risk is that I miss something ovbious. :)
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.
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Re: access denied when copying home to a new partition

Post by scorp123 »

Husse wrote: I try to copy the content of /home to the newly monted partition in /mnt/newhome/ but I get access denied

Code: Select all

sudo cp -a -v -u /home/* /mnt/newhome/
... type it exactly like this!! (with all the slashes and stuff where I put them!)
Husse wrote:I miss something ovbious.
You have to do such stuff as "root", e.g. by using "sudo".
Husse

Post by Husse »

Thanx!
It has to do with user rights as you say, but its been playing tricks with me. I chown-ed the newhome folder from root to me and copying went just fine, but the number of files was different so I formatted and attempted a new copy. Then I got access denied even when I'm the owner :(
A well, will put a sudo in front of the copy :)
Scorp123 - your method worked. Does it copy all hidden files, hardlinks, softlinks etc? I suppose the answer is yes :)
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

Husse wrote:Does it copy all hidden files, hardlinks, softlinks etc?
The man pages are your friend :D

Code: Select all

man cp
Husse

Post by Husse »

In a hurry yesterday - planned to check man cp today :)
Locked

Return to “Installation & Boot”