Let's say you are trying to change the permissions of some files (using chown or chmod), but you get an error:
Operation not permitted
This is (in most cases) because the files are locked (you can verify that by going to "Get Info" for each file or directory). One way to solve it is to go through the list of permission errors and manually unlock them using Finder. A quicker way is to do it on a command line: