I have done this twice. I have chown the /etc and / folders and fubarred my Ubuntu. Yes, I am a bonehead for doing this.
Reboot and hit e when the splash screen shows up. Change boot line to single
Hit F10 to boot the change to single. You don’t need to go back and change it. It only does it that time.
I chown (root) / to www-data:www-data. I did a chown -R root:root / and then chown -R www-data:www-data /var/www
/usr/bin/sudo must be owned by uid 0 error can be fixed.
chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo
I looked at the directories of another Ubuntu server and made sure the /var/log and /usr directories user:group were reset correctly. I do have backups so I could have reverted back.