I am using ubuntu 10.04,I need to give execute permission in www folder.But by mistake i gave execute permission in whole var folder.
sudo chmod -R 777 /var
Then i try to change it into normal permission.For that i gavesudo chmod -R 775 /var/
And again i gave execute permission only www folder.But the problem is my index.html file is not run which is located in inside the www folder. How to restore the default permission on the /var directory/folder.
The quick answer is that you're screwed. There is no undo. Be careful what you do with sudo. The quick solution is to reinstall.
But as this is just /var we could perhaps try to fix it. I could for example run this command on my system:
This would give a script that you could run, and would try to reset all permissions as they are on my system. This should fix most issues. But I'm not sure how similar my installation is, as I'm using 12.10.