access denied when copying home to a new partition

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

access denied when copying home to a new partition

Postby Husse on Sun Mar 18, 2007 10:46 am

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. :)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Linux Mint is funded by ads and donations.
 

Re: access denied when copying home to a new partition

Postby scorp123 on Sun Mar 18, 2007 1:24 pm

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".
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby Husse on Mon Mar 19, 2007 7:48 am

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 :)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Postby scorp123 on Mon Mar 19, 2007 11:24 am

Husse wrote:Does it copy all hidden files, hardlinks, softlinks etc?
The man pages are your friend :D
Code: Select all
man cp
User avatar
scorp123
Level 8
Level 8
 
Posts: 2287
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Postby Husse on Tue Mar 20, 2007 6:36 am

In a hurry yesterday - planned to check man cp today :)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden


Return to Installation & Boot

Who is online

Users browsing this forum: Google [Bot] and 21 guests