When I try to do something like:
chmod -R ug+rw files
On a folder with existing content I get:
chmod: Unable to change file mode on [fill in the blank]: Operation not permitted.
It's on a site on my own computer (which I am the admin of).
Do sudo chmod -R ug+rw files
. You have to be the owner of all of the files to change the permissions, unless you're operating with root privileges.