Results 1 to 8 of 8
My main system is Arch 64. I recently changed disks and rsynced over all partitions ("/" and "/boot") to the new one. In the process, I had to change permissions ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-27-2011 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 60
[solved] System malfunctions after restore (wrong permissions)
My main system is Arch 64. I recently changed disks and rsynced over all partitions ("/" and "/boot") to the new one. In the process, I had to change permissions on files because I was doing it form another distro (Ubuntu).
I can login to X, but then most of things won't run.
I am sure it has something to do with permissions on file system because I changed them before on both / and /boot partitions using
I subsequently tried fixing it form Ubuntu using the same method:Code:sudo chown -R $USER:$USER <Mount Point>
and as mentioned, I am now able to login, but most of things still don't work (for example, sudo, terminal etc, etc).Code:root:root for / juha:users for /home/juha root:root for /boot
The problem is this is my private and work laptop so now I have to run it on livecd Ubuntu which is tedious...Last edited by Lockheed; 06-27-2011 at 07:59 PM.
- 06-27-2011 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,744
It would take a lot of effort to get everything running correctly, using such a technique. Why did you rsync your "/" partition, do you have data you care about?
If I were you, I'd just back up the files/directories of importance to some network or USB-accessible storage and install your Linux OS of choice from scratch.
- 06-27-2011 #3Just Joined!
- Join Date
- Nov 2007
- Posts
- 60
Why is it so difficult if it's just permissions and there is only root and one user on the system?
Yes, it took me few months to bring this system to the current state and I would not like to repeat it.
Is there some command I can run to reinstall all installed packages? For pacman or yaourt? After all, they keep track of everything that's installed on the system.Last edited by Lockheed; 06-27-2011 at 06:00 PM.
- 06-27-2011 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,744
B/c it is potentially a lot of files/directories that need to be changed, which has nothing to do w/the amount of users on the system.
if you want to keep everything as is, then maybe you could install a similar working Linux distro on another machine, then compare permissions. this command, run on the working machine, would give you a list of files, dirs, etc. and their respective permissions:
and substitute $DIR for your high-level directory, e.g. "/usr" or even "/" (but that would be a LONG list! and really, you should exclude dirs like /sys and /proc which are created at boot time. Come to think of it, the /dev directory is a very important one, permissions-wise, and you should pay attention to it).Code:find $DIR -printf "%p: " -exec stat -c %a {} \;
can you possibly just reinstall the applications that are not working properly, which should not affect data itself? I'm not familiar w/Arch, but there should be some sort of package verification, I would hope.
In any event, try tailing /var/log/messages in one terminal (and possibly /var/log/secure in another), then log into X and start trying to run things, and see what errors (if any) gets logged to messages (or secure). hopefully, if something is broke - it is related to permissions and a helpful error message is logged there.
- 06-27-2011 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,232
Well, you are in it now because of how you backed up your system drive. Using rsync for data is one thing. Using it for the system drive where there are a lot of special files that cannot really be rsync'd is something else entirely. My recommendation is that to backup/restore the system drive is that you do a bit-image backup of the entire hdd and if you have to restore, then you can use dd to write the entire system back to the drive. Using rsync on things like /etc is fine, but on / is just asking for trouble.
What I do:
1. Make regular bit-image backup of system drive.
2. Rsync /etc to keep configuration data up-to-date.
3. If need to restore system, us dd to write bit-image back to system drive and then restore /etc changes.
This has worked well for me in the past, allowing me to reasonably quickly restore the system to a known good state.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-27-2011 #6Just Joined!
- Join Date
- Nov 2007
- Posts
- 60
Man, I rule. For anyone else running into this problem:
thenCode:pacman -S $(pacman -Qq | grep -v "$(pacman -Qmq)")
and voila - system works like a charm.Code:sudo chown -R $USER:$USER /home/$USER
- 06-27-2011 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,232
Great! Unfortunately, I don't use Arch Linux, so I'm not familiar with pacman. As a result, I gave you the best info I had under the circumstances. In any case, we're glad you got things sorted out!
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-27-2011 #8Just Joined!
- Join Date
- Nov 2007
- Posts
- 60
Thanks all!


Reply With Quote
