Question

By mistake I give via ssh with root privelege a

chmod -R 777 /var/

in stead of

chmod -R 777 var/ for a var folder inside a home directory.

Now I cannot login again via ssh. I have a resque mode availble.

What to do? Does someone this?

Was it helpful?

Solution

First of, twice check your input while in root mode. Then, you need to restore correct permissions in your ~/.ssh folder:

chmod 700 ~/.ssh
chmod 644 ~/.ssh/*

And, also, restore your permissions in /var directory as well:

chmod 755 /var/empty
chmod 755 /var/run
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top