0

So I accidentally did sudo chmod -R 775 / when I meant to do sudo chmod -R 775 ./. I quickly realized and hit Ctrl^C, but not in time to save everything. I realize this is a really stupid mistake and all that but I'm aware of that and I would just like to fix my OS now.

Anyway, this completely broke my OS (Ubuntu 12.04). Currently, several functions of the shell, including tab completion prints the error

bash: cannot create temp file for here

And running any bash command that I have tried on any file in my home (/home/$USER) folder crashes the terminal. Several other random things don't work around the OS now.

hg8
  • 13,462
  • Fastest method to fix it: re-install from a live dvd WITHOUT formatting the partitions. – Rinzwind Jul 29 '15 at 07:56
  • It would probably be much, much harder for you to try to restore your system than to just reinstall it at this point. I would suggest getting any data you have to another partition, and reinstalling. Reinstalling ubuntu is pretty easy if you have enough hard drive space to backup all your data onto a separate partition. – daboross Jul 29 '15 at 07:57
  • No, nothing has been annihilated. All content is still there, you will just have to recover it. You didn't do a rm -rf /. – zwets Jul 29 '15 at 07:57
  • 1
    @zwets Not so much about the files, all the important ones are backed up on git. But so many settings, programs, really fine tuned configurations, man this is going to be annoying to start from 0 again. Thanks though. – user1032369 Jul 29 '15 at 08:04

1 Answers1

2

Back-up important files (if you have any) after booting from a live-cd, then reinstall system. This is the only option that I know of.

Daniel
  • 236
  • Can't back anything up since all terminal functions are destroyed. :/ – user1032369 Jul 29 '15 at 07:58
  • That's why you use the Live-CD. Insert ubuntu cd, start in live mode (boot from cd) and then mount your drive, recover any files you need to save. Then reinstall system. – Daniel Jul 29 '15 at 07:58
  • This is a virtualbox VM, I have an ISO file for this OS. How do I do this on virtualbox? – user1032369 Jul 29 '15 at 08:00
  • The same way you would do with a regular PC. Mount the ISO and boot the VM, it will ask if you want to boot with the disk. – Daniel Jul 29 '15 at 08:02