To fix that particular issue is easy:
sudo chown -R root /var/lib/sudo
As for why that happened... I believe that when you were messing with permissions for
/var/www you somehow, by accident, changed permissions (and ownership) of all
/var tree, including
/var/lib/sudo. (I bet the user you were trying to set has id=33)
This may have many consequenses, the sudo warning message being just one symptom.
As for the consequences... it really depends on what (and where) you did. Many (but not all) files and folds in the
/var tree are owned by
root:root, and its basically impossible to know who each and every file and folder originally belonged to. Full reinstall would be the only feasible way to restore it.
If you changed only the
/var/lib tree, it narrows down the "damage", but not much: there are still hundreds of files there.
You can try to find out which command you issued caused this trouble, accesing your bash history:
gedit ~/.bash_history &
Maybe this will give a clue about what happened and its consequences