I ran:
chown -R [myuser] /*
by mistake and now Ubuntu won't boot. All I see is the loading screen for Ubuntu. I cannot ssh into the machine. The Apache server is down, but ping works. In root shell (when I booted into recovery) I discovered sudo didn't work as well due to incorrect permissions for the /etc/sudoers file. I managed to fix that. The machine still doesn't boot though.
How do I revert the changes made by chown -R [mynonrootuser] /*? How do I get everything back to its default permissions?