I recently made something very, very stupid. Instead of typing: chown adam ./* I wrote: chown adam /* (I forgot about the very important dot). Now I have some files with owner adam instead of... hmm I don't really know who. I can't even call su and login as root because I get: su: cannot set groups: Operation not permitted. I am able only to run my Arch Linux cd, run it in EFI mode, login as root and call arch-chroot /mnt, where under /mnt my main Linux partition is mounted. The situation is bad but not terrible. Is there any way to restore my system?
|
|
|||
| show 1 more comment |
|
I would start with Note, if you simply chown'd the files, you're in a much better position than someone who chmod'd or chgrp'd their system. Most files on a single-user system (i.e., used just by you) are either owned by you (in /home/username) or owned by root. There might be a few weird files in You will probably then want to wipe out the
|
||||
|
|
sudo chown -R root /bin /sbin /lib /usr /sys /boot /etc /devfrom inside the chroot - This should get you a bootable system, but I'm not 100% sure. Might want to wait for someone to confirm that this won't make the situation worse. – Darth Android Aug 30 '12 at 16:38chown ... *? Skip the/completely? – Daniel Beck♦ Aug 30 '12 at 17:03