How to set umask:
=============================
vi /etc/profile
if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then
umask 002
else
umask 022
fi
and also add umask in /etc/bashrc
if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then
umask 002
else
umask 022
fi
[root@hnm etc]$ grep umask /etc/profile
umask 002
umask 022
[root@hnm etc]$ grep umask /etc/bashrc
# By default, we want umask to get set. This sets it for non-login shell.
umask 002
umask 022
[root@hnm etc]$
Thanks : Harihar Mishra
No comments:
Post a Comment