Can't clear caches locally
How are you setting permissions? Command prompt? (S)FTP? What user does php run under? Make sure there are no open_basedir restrictions as well. 

You can find out the user that php runs under as well as a bunch of other details right inside Craft: http://server/admin/utils/phpinfo and look for user/group and open_basedir.

Make sure you're giving the storage directory recursive permission as well. I would delete everything under /storage manually...

cd /path/cms/craft/storage/ &amp;&amp; rm -r * &amp;&amp; chmod -R 777 . 


... and then let Craft/php recreate the folders underneath.