I was wondering if it was possible to reset all the folders' rights. I was having trouble when trying to install LAMP on my Ubuntu 11.04 installation, and I modified many permissions like /var /etc and I want to cancel everything I did and have permissions set to how they would be after a new install.
If you messed up a bunch of permissions in system directories, your best bet is to reinstall. Unless you can find somewhere a comprehensive list of the correct permissions, you probably won't get it right; furthermore, some things will fail, perhaps in surprising ways.
So, you're best off reinstalling in this situation. In the future, I'm sure you'll be more careful about what you chmod.