1

i accidentaly ran " sudo chmod 700 /* ", is there a way to undo this..?

i have no idea what to do. I am on Ubuntu 22.04 desktop amd64

amogus guy
  • 21
  • 2
  • Does this answer your question? [How to repair Ubuntu after messing up permissions on critical directories?](https://askubuntu.com/questions/1383168/how-to-repair-ubuntu-after-messing-up-permissions-on-critical-directories) – cocomac May 24 '22 at 19:54

1 Answers1

2

Boot using a live session usb (the one you used to create Ubuntu), create a backup of your personal data and then reinstall without formatting any of the partitions. The backup is in case you make another mistake.

This will reset all system related files but leaves configuration files as is. The partitions need to be mounted with the same filesystem you originally installed the operating system on.

You might need to manually reset some custom files but the system itself will allow you to do that. And if that does not you will need an actual re-install with formatting

Rinzwind
  • 293,910
  • 41
  • 570
  • 710
  • Wait you can reinstall and keep your files?! May I ask when that was added? I [did something simaler to what the OP did once](https://askubuntu.com/questions/1383168/how-to-repair-ubuntu-after-messing-up-permissions-on-critical-directories), and that would have been useful then – cocomac May 24 '22 at 19:55
  • 1
    @cocomac we always had the option to mount partitions and not format if those partitions you mount are the same as it was made with. Files that are not part of the install will stay as is (think configuration files like apache2.conf (apache config) or my.cnf (mysql config). Also includes the Desktop directories. – Rinzwind May 24 '22 at 19:57
  • @Rinzwind Why only ext4? What about btrfs? – Pilot6 May 24 '22 at 19:59
  • @Pilot6 hey give me those 5 minutes to edit :=D – Rinzwind May 24 '22 at 20:00