Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Saturday 19 October 2019

umask value modification on specific user account for Linux-unix server



                                                                 
While doing user administration we received one request for permanent umask value change.

First understand what is umask and what exactly this value do if admin create file or directory on UNIX and Linux system.

Answer: umask value determines final permission value for directory and file, which admin create.
so by changing this value admin can customize these permission according to security requirement.
default value of umask is 022.

How Directory and file  how umask calculated ?
Ans:

Directory:  777-022 = 755    Final permission for directory after umask subtract.
File:           666-022 = 644     Final permission for File after umask subtract.


.Lets see what is the scenario............

Scenario:

For user oracle change umask value from 022 to 002.

Solution : answer to this request is simply edit .profile using vi editor and add line umask 0002 and save file. After saving file log out and log in to user account to make these changes effective or reload .profile using any one below mentioned command.

Reload .profile using using any one command from following list.

1. oracle#/home/oracle: . $HOME/.profile     
2.oracle#/home/oracle . .profile


After reload of .profile if admin execute "umask" command he will see changed umask value from 022 to 002. This method is useful in situation where this value need to persistent.

Thanks.

No comments:

Post a Comment