Ssh – Restore file permission on CentOS 7

centos7sshterminal

I managed to messed up server permissions on entire server

chown root:root -R /
chmod 777 -R /

How to fix it?
I can't login as root using terminal on that machine it show error "Invalid password" and SSH shows error "connection reset by remote server"

Note:
I try to reinstall CentOS 7 using USB. but got stuck during Select disk stage as it will not let me select / without formating it.
This question explains what my commands did. Why is "chmod -R 777 /" destructive?

Best Answer

Restore from backup or rebuild the server.