Recover From Ownership Change Disaster? Or Re-Install Majaro?

Ok, I must admit to a really bozo blunder when trying to adjust ownership of two folders on a new Manjaro Linux install on a work computer today. I was in Konsole and I thought I was inside folder “/d” and I typed:

chown -R aragorn:aragorn *

in order to change ownership of all files and folders inside /d to “aragorn:aragorn”.

However, I was actually in “/”, not “/d”, so that changed ownership of nearly everything! It also generated thousands of error messages, but I could only see the last 1000 because my console scrollback was set to 1000.

I tried to fix that by doing:

chown -R root:root *

then going into folders “/d”, “/e”, and “/home” and changing ownerships there manually.

However, that was not entirely successful, as some things are now broken:

  1. “su” rejects root’s password (but I can do ctrl-alt-2 and login successfully as root)
  2. “sudo” is broken and says “/usr/bin/sudo must be owned by uid 0 and have setuid bit set”
  3. pamac is broken and crashes with “authentication failure”.

This is a recent (1-week-old) Manjaro installtion and has no un-backed-up data files, so simply reformatting the SSD and reinstalling Manjaro is an option.

So, what do you think? Can this be fixed? Or should I just nuke it and re-install Manjaro?

Yes, backup your data and reinstall.
We should blame @Aragorn for all this :sweat_smile: :crazy_face: :sweat_smile:

4 Likes

Yep, it appears I must, as too many things are now broken. The afflicted machine shut itself off for some reason, and when restarted, it’s now rejecting my password. I could probably login to ctrl-alt-2, but there’s no point, it’s hosed. Amazing how, as superuser, one can destroy an entire computer in 1 microsecond with a single stroke of the Enter key. :unamused: I need to be more careful about that. “su” is like a loaded bazooka.

As for “aragorn”, that’s been my main user-id on most computer systems for years. And when I’m not “aragorn”, I"m usually “gandalf”. :slight_smile: (Though perhaps I shouldn’t call myself a computer “wizard” when I’m making blunders like this)

Copycat! You don’t even look like me! :face_with_hand_over_mouth:

2 Likes

Smeagol, then? Or Gollum.

1 Like

With btrfs and a snapshot you could have made a simple rollback, :smiling_face_with_three_hearts: and be free again (last snapshot was maximum 59 min ago :wink: )
Then you would reboot, and copy those files altered in the last 60 min into the running snapshot.

  • Only lost some time ( may be 30 min ), but no data -

Everybody has days like this. So be prepared. :innocent:


You can find good Information about Btrfs in the wiki

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.