unix

How do I set the umask for files created on my Linux server?

To set the umask for all users, you can update the /etc/profile file. For individual users, you can update their .profile, .bash_profile, or other environment configuration login script.

To set the umask in the /etc/profile file (global – for all users), append this line:

umask 002

For an individual user, you can append that line to their .profile, .bash_profile, etc.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top