I usually need to change permissions of files and folders on our servers or on my Mac, in order to execute software correctly. Most cases, folders should have 755, files should have 644 permissions. It’s not possible to do that one by one, therefore I usually need some unix / OSX commands to do that. And figured out whenever I need this (almost every week), I figure out I try to search the Internet. So here is the magic code; so we all know where to find it when we need it again :)

chmod -R 755 *
find . -type f -print0|xargs -0 chmod 644