search
top

Changing umask based on Group Membership in Solaris 10 in profile

Recently ran into a situation where we needed to make sure that the umask of 002 was set on all the files owned by a specific group.  There are several solutions but one way is to set the umask in the /etc/profile.

For Solaris 10 it is set in the profile here.

If we wanted to make all set to 002 then just modifying umask 022 would do the trick, but we want a specific group. So we add some test code after umask 022.

This allows us to set umask of 002 to all files created by myspecialgrp. Save the changes and login with an id in the group and touch a file and it will be set to umask 002 (rw-rw-r–).

Leave a Reply

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

top