umask 022
Then when you create new files their default permissions will be 644 (666 minus 022, i.e. -rw-r--r--). When you create new directories their default permissions will be 755 (drwxr-xr-x). If the umask value were instead set to 077, your default permissions would be 600 (-rw-------) and your default directory permissions would be 700 (drwx------).
For reference, the following table shows the mappings between umask values and default permissions. BE VERY CAREFUL not to confuse umask and chmod permissions, as they are entirely different (a binary inversion of each other) and are NOT INTERCHANGABLE!!
To discover what umask you are currently working with, type:
% umask
Here are some examples of settings for umask:
umask 077 - Assigns permissions so that only you have read/write access for files, and read/write/search for directories you own. All others have no access permissions to your files or directories.
umask 022 - Assigns permissions so that only you have read/write access for files, and read/write/search for directories you own. All others have read access only to your files, and read/search access to your directories.
umask 002 - Assigns permissions so that only you and members of your group have read/write access to files, and read/write/search access to directories you own. All others have read access only to your files, and read/search to your directories.
If you set umask at the shell prompt, it will only apply to the current login session. It will not apply to future login sessions. To apply umask setting automatically at login, you would add the umask command to your .login file (C Shell users) or .profile (Bourne and Korn Shell users).