0

I executed chmod -R 777 . command in /var directory mistakenly when I tried to execute it in another directory. Now as I start my OS, on the startup page, it crashes and doesn't show the login screen.

How can I correct his?

OS: Debian 10. DE: gnome

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
Faramarz Qoshchi
  • 359
  • 1
  • 4
  • 13
  • 3
    Have you seen [this](https://unix.stackexchange.com/questions/156568/fix-broken-permissions-on-var-or-any-other-system-directory)? – KGIII Oct 17 '20 at 17:43

1 Answers1

1

You can reinstall all the packages using aptitude, although this is a quite slow process, but if you want to you can do like so:

dpkg --get-selections \* | awk '{print $1}' | xargs -l1 aptitude reinstall

You'll have to switch to a console first if the graphical environment is not working.

Jesús Ángel
  • 379
  • 2
  • 12