Using Unmask in WebLogic

When trying to unmask in WebLogic files, the user should first set the umask value to the required permissions value in both the startWeblogic.sh script and startNodeManager.sh script. For all the files the user creates, the user should set the umask value in .bash_profile.

 

Calculating the Final Permission for FILES

Note: The minimum and maximum UMASK value for a file is 000 and 666 and for a folder 000 to 777. The user can simply subtract the umask value from 666 to determine the final permission for the file.

Ex: 666 – 022 = 644

File Full permission value: 666
umask value: 022
subtract to get permissions of new file (666-022): 644 (rw-r–r–)

umask 022 = chmod 644

 

Calculating the Final Permission for DIRECTORIES

Again, the user can simply subtract the umask value, but this time from the 777, to determine the final permission for the directory.

Ex: 777 – 022 = 755

File full permission value: 777
umask value: 022
Subtract to get permissions of new directory (777-022) : 755 (rwxr-xr-x)

umask 022 = chmod 755

 

What value we need to set for UMASK:

If the user wants to set 644(rw,r,r) to a file using umask, then he or she will need to mention as umask 022.

No Comments

Leave a Comment

Your email address will not be published.