You are not logged in.

#1 2010-10-18 03:57:01

ruhtranayr
Member
Registered: 2010-08-16
Posts: 4

Copy arch to new disk = screwy user permissons

I copied arch to a new disk today, using an ubuntu 10.04 live cd...

I've gotten my system up and running but it seems i'm having some user permission problems

startx wont start...

[ryan@psychicstate ~]$ startx
mktemp: failed to create file via template `/tmp/serverauth.XXXXXXXXXX': Permission denied
/usr/bin/startx: line 156: cannot create temp file for here-document: Permission denied

and sudo is broken

[ryan@psychicstate ~]$ sudo cp
sudo: must be setuid root

I should also note that I issued a #chown -R ryan /home/ryan/* thinking this would fix some things....

Help?

Offline

#2 2010-10-18 04:11:05

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Copy arch to new disk = screwy user permissons

You should re-copy preserving permissions (dd is normally easiest). Once you've messed up permissions it can be really hard to fix things.

Why not just re-install Arch? Doesn't take THAT long, and you can copy over /etc/* and /home/ryan and pretty much have your system back.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2010-10-18 06:10:52

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Copy arch to new disk = screwy user permissons

cp -a always works perfectly for me.

Offline

#4 2010-10-18 07:45:49

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: Copy arch to new disk = screwy user permissons

tomk wrote:

cp -a always works perfectly for me.

Me too, when I move my Fedora from one partition into another partition in the same disk. I think, if I'll do that again if I want to set up Arch in the new system.


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

#5 2010-10-18 08:43:18

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Copy arch to new disk = screwy user permissons

He left out the -a flag indeed, and that was crucial. Just copying stuff recursively isn't gonna cut it...


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#6 2010-10-18 09:23:47

ruhtranayr
Member
Registered: 2010-08-16
Posts: 4

Re: Copy arch to new disk = screwy user permissons

thanks guys

@ngoonee - i took your advice and reinstalled... it seems i dont have the drive space to dd and i suppose its easier to just use cp

@tomk, .:B:. - i definitely missed the -a flag, thanks for the tip

right now, i'm copying over my home partition with $sudo cp -a /media/backup/* /home ....
theres a few users here, but the one i'm concerned about is ryan...the old ryan will wipe out the new ryan...i think it should be okay though, right? i mean the new ryan is basically empty...hmm, ill keep you posted. thanks again.

Offline

#7 2010-10-18 13:33:48

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Copy arch to new disk = screwy user permissons

The files belong to a UID (a number), not a particular 'name'. Just make sure your new 'ryan' has the same UID number.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#8 2010-10-18 16:43:09

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Copy arch to new disk = screwy user permissons

If the user with the original UID does not exist, you'll see something like:

-rw-r--r-- 1 1005 users  86K jan 30  2010 boot.efi.xz

Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#9 2010-10-18 22:51:16

Mr. Swillis
Member
Registered: 2008-06-24
Posts: 54

Re: Copy arch to new disk = screwy user permissons

I typically go with a fresh install for this. A couple of tips:

1) Save important files in /etc like rc.conf, any xorg customizations, and anything else you may have tinkered with in there. I, personally, make routine saves to a seperate HD that I mount for backups.

2) Save all of the contents of /home/ryan to an external source and "copy" to the new /home/ryan after you have logged into the new system as ryan. Using copy this way will inherit the ownership of the current user who executes the copy command and avoid most (if not all) potential permissions/ownership issues.

3) You can copy the contents of /var/cache/pacman/pkg (assuming you haven't cleared this) to an external source as well and then copy to the new system. This will save you a bunch of time as the packages won't need to be downloaded when installing.

- Swill


And you ate the whole... wheel of cheese? How'd you do that? Heck, I'm not even mad; that's amazing.

Offline

Board footer

Powered by FluxBB