Permissions Error on Upgrade

we had to change a lot of permissions to do the upgrade from 2.0.6 to 2.0.7, and then 2.0.8



So after making all the permissions change, now we have the same warning at the top and bottom of our webpage.



Warning: file_put_contents(/home/admin/public_html/var/cache/top_menu.GET_0.0EN.usd.php) [function.file-put-contents]: failed to open stream: Permission denied in /home/admin/public_html/core/class.registry.php on line 158



I searched for this file: /home/admin/public_html/var/cache/top_menu.GET_0.0EN.usd.php



and its actually not there. the closest thing to that is this file: top_menu.EN_usd.php

This file is 777 permissions.



I guess the filename above is autogenerated by the line of code on line 158, which is:

file_put_contents(DIR_CACHE . $fname, “”);



I also searched for the class.registry.php file above and it is 777 permissions too.



Has anyone seen any errors like this? Or know what we can do to resolve it?