The files get their default permissions from the users or processes that create them. If a file is created using text editors, it will have read and write permissions and no executable permissions for everyone. Similarly, a binary executable created using compilers generally has executable permission sets, since they are meant for execution.
Default file and folder permissions are set by the umask program. The umask command without any argument will display the existing value of umask. The same command, when followed by a new octal value as an argument, will set the new value of umask. The following command line is used to view the existing umask of a user: