1.8. umask
When you initially log in to the system a command called umask sets your default file creation mode. This command is actually the opposite of the chmod command! Your system administrator should have set this to a reasonable value so when you create files users who are not members of your group will not be able to write to them.
When you are in the shell you can use umask to alter the creation mode of files to your personal preference. This change is effective until you either log out or manually issue another umask command.
Generally, the umask is set in the /etc/profile file, which is the file everybody gets, so if you want to change the umask for everyone put an entry in that file. If you want to set it permanently for your own ...
Get Linux and Unix Shell Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.