top of page
  • Writer's pictureMukesh Chanderia

Linux - Commands Part 11 -Umask

Updated: Aug 21, 2021

1) Default permissions is defined by umask

umask for Root = 022

Dir 777 -umask = 755

File 666 -umask = 644


2) There is hidden file .bashrc

[adminji@RedHat ~]$ l.

. .. .bash_history .bash_logout .bash_profile .bashrc .ssh .viminfo


umask value can be changed with command umask but will set to default once user logs off.


3)To set this permanently put this value in .bashrc

vim .bashrc

# .bashrc


# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi


# User specific environment

PATH="$HOME/.local/bin:$HOME/bin:$PATH"

export PATH


# Uncomment the following line if you don't like systemctl's auto-paging feature:

# export SYSTEMD_PAGER=


# User specific aliases and functions

umask 111

4 views0 comments

Comments


bottom of page