Sunday, November 18, 2012

umask 022 or 002

We have 2 separate WebLogic domains, with 2 separate Linux users: soa and soa2.

It is important to SEPARATE these 2 users, so that if I login as soa, I can do operations (write access) only on the soa domain.

A possible approach is having soa and soa2 being member of the same group "soa", and imposing that both users have umask 022 .

umask 022
Normally you set this value in the /etc/profile startup file

UID=`id -ru`
if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
    umask 002
    umask 022

"id -ru" is the numeric ID (example: 1004)

-r print the real ID instead of the effective ID
-u print only the effective user ID
-g print only the effective group ID
-n print a name instead of a number

No comments: