How does your Mac know what permissions to set on newly created folders and files? It uses a umask. This explains what that is, how to work it out, and how to change it.
chmod
Setting permissions in Terminal is simple. This basic introduction explains how to understand the notation used, and save yourself time fiddling in the Finder.
How to inspect and change them, in the Finder and the command line.
