You are not logged in.

#1 2008-10-28 01:31:45

techprophet
Member
Registered: 2008-05-13
Posts: 209

Dumb permissions issue after backup and restore

OK, so I needed to shrink an XFS partition and grow another. It turns out XFS can't shrink and doesn't grow well, so I copied everything to an NTFS partition using an Ubuntu 8.04 LiveCD and reformatted, then copied back. I edited fstab so that it now knows that they are reiserfs and not xfs, but now I can't boot or chroot into it!! Any idea how I can fix it? I can't run pacman from it (bash: ./pacman: Permission Denied). Any help?

Offline

#2 2008-10-28 01:44:55

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Dumb permissions issue after backup and restore

/me could very well be wrong

Does the new XFS partition have the 'boot' flag enabled?

Offline

#3 2008-10-28 02:23:18

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: Dumb permissions issue after backup and restore

I suspect that all your permissions are well screwed if you just copied straight to the NTFS partition (ie, not using tar or similar). NTFS doesn't support POSIX permissions, so when you moved everything back, they would have taken ownership/group according to your login, and permissions according to your umask. Probably 644 for files and 755 for directories.

Offline

#4 2008-10-28 03:50:19

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Dumb permissions issue after backup and restore

Depending on how you mounted the NTFS partition (its owner and any mount flags you used), it's possible that all the files you copied back don't have execute permissions. And if you did everything as root, it's possible everything is owned by root (possibly with 555 permissions).

Last edited by B-Con (2008-10-28 03:51:35)

Offline

#5 2008-10-28 12:52:59

techprophet
Member
Registered: 2008-05-13
Posts: 209

Re: Dumb permissions issue after backup and restore

I added u+x (logged in as root) to /bin and /usr/bin and made the permissions for all else rwxr-xr--

I will check the boot flag. Can anyone give me proper permissions for /bin /sbin /etc /usr/* and other stuff so I can chmod back (they are all already owned by root)?

Offline

#6 2008-10-28 14:10:32

techprophet
Member
Registered: 2008-05-13
Posts: 209

Re: Dumb permissions issue after backup and restore

boot flag is OK.

I just got it to let me chroot in by running the following:

# chmod -R 755 bin
# chmod -R 755 sbin
# chmod -R 755 lib
# chmod -R 755 usr/bin
# chmod -R 755 usr/sbin
# chmod -R 755 usr/lib
# chroot /media/disk

Yeah! Now I'm regenerating my kernel26.img (I backed up to my arch /root/ dir first) to make sure things work with the new fs.

Offline

#7 2008-10-28 21:25:59

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: Dumb permissions issue after backup and restore

Once you get back in, reinstall all your packages so pacman can give the correct permissions (not just ones that work wink)

pacman -S --noconfirm `pacman -Qe`

EDIT: Fix early morning stupid typo

Last edited by fukawi2 (2008-10-28 21:26:18)

Offline

Board footer

Powered by FluxBB