Answer the question
In order to leave comments, you need to log in
How to fix server crashes after changing the permissions of the /var directory?
I believe that it all started with the fact that I foolishly executed chmod -R 777 * /var from under the root.
After a couple of hours, ssh stopped working, Connection reset by peer. I went through the VNC console on the hosting. Restarted ssh, error became "port 22: Connection refused", but ssh is definitely running. Half an hour later I was knocked out to the login screen, but I can’t enter either the login or the password, the console only responds to Enter, re-displaying the greeting, the encoding periodically flies. On the server site, it works fine. Support refers to an internal system error, they say, reboot.
Could this be my mistake? Will a reboot help? How to fix it?
UPD: Reboot helped, ssh and console worked. Tell me, how should the rights to the var directory be set?
Answer the question
In order to leave comments, you need to log in
Expand from backup. If there is no backup - SSZB.
You have there in the system log "/var/empty/sshd must be owned by root and not group or world-writable." and sshd is not running. I don’t know how rpm-based, apt can blow its head off due to incorrect permissions in /var/apt.
The only possible way out is to reboot into single-user mode via VNC and edit the rights from there (on the GRUB screen, select the line with your kernel, click a
and add the word separately to the end single
, for lilo you also need to add an option single
to the end of the boot line)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question