Check the current logged in user by running id command. Now change the umask value to 0002 by running umask 0002 command as shown below. Check again the umask value to confirm if it is changed.
How do I change the umask in Linux?
If you want to specify a different value on a per-user basis, edit the user’s shell configuration files such as ~/. bashrc or ~/. zshrc . You can also change the current session umask value by running umask followed by the desired value.
What does umask 022 mean?
Brief summary of umask value meanings:
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.