Checkout the umask settings. You can set it once with the command "umask", but if you want to keep it permanently, you have to include it in .bashrc, .profile, ... or whatever you use.
There is also a setting for the pam login technique. (/etc/pam.d)
I have for example in /etc/pam.d/common-session:
optional pam_umask.so umask=002
But that's now really going into detail; I would need to know more about your system.
To get "local" umasks, there is also a mount option umask, that only changes the umask for this device. However, this only is true for certain filesystems, like FAT.
On umsaks and access rights:
As vtest pointed out, 777 is not a good choice for access rights and usually not needed. With the umask 002 the group gets write-permition. The reason to do this is, now you can give the dir. a group-ownership of your choice and set it's rights to 2775 (that is rwxrsxr-x). The group-s (or 2000) means, that each created file or dir. will again belong to this group and so be writeable by all in that group).