You are not logged in.

#1 2009-04-24 03:50:56

Nixie
Member
Registered: 2008-09-24
Posts: 51

Reset permissions to default?

My file and directory permissions were messed up while backing up my Root partition (my Home partition is still perfectly fine). So now su & sudo do not work for my normal user account, VirtualBox will not load and I cannot shutdown/restart my laptop from my user account. All of which is a pain.

Is it possible to somehow restore the permissions back to the normal Arch defaults using a simple command?

jhrq0l.jpg

I really don't want to re-install from scratch, I'd rather login as root and try repairing this mess

Offline

#2 2009-04-24 04:50:59

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

Re: Reset permissions to default?

Doh! tongue

Does chmod still work? How about pacman? Something like this might work:

for PKG in `pacman -Qe | awk '{ print $1 }'` ; do
   pacman -Sy $PKG
done

Offline

#3 2009-04-24 09:19:29

Nixie
Member
Registered: 2008-09-24
Posts: 51

Re: Reset permissions to default?

Thanks for that fukawi... & Doh! indeed. I'd backed up and restored safely before, but this time made the mistake of backing up to a ntfs drive. That's how my permissions were lost  roll

I tried what you posted but would have had to sit there saying yes to each and every package. It gave me somewhere to start from tho. So I searched the forums & found this:-

for i in `pacman -Q | cut -f1 -d " "` ; do pacman -S --noconfirm "$i" ; done

It seems to have done the trick. I still needed to reinstall a few things from the AUR but at least I've got su and sudo back (yay!)

Last edited by Nixie (2009-04-24 09:20:04)

Offline

#4 2009-04-24 09:22:05

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

Re: Reset permissions to default?

That's what I meant... I just missed the --noconfirm part smile

Offline

Board footer

Powered by FluxBB