The only reason I can see that would happen is if you are not root. Also I would drop the 0 and just use:
To give an entire directory and all subdirectorys and files 777 use:
chmod -R 777 directory
Are you sure you want to give read/write/execute privledges to everyone
There is a very good site here:
It will tell you exactly what permissions to use.