I made a total mistake here. Anyway I ran
chmod -R 777 /* and immediately regretted my decision.
I had to boot into single user mode to and ran
chmod -R 755 /etc/* in order to login to the server.
The only problem is ssh now and obvious security issues.
How do I get SSH working again?