Red Hat Bugzilla – Bug 961348
/etc/bashrc sets umask based on wrong user number range
Last modified: 2013-05-09 14:51:19 EDT
Description of problem:
# By default, we want umask to get set. This sets it for non-login shell.
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
However /etc/login.defs contains:
# Min/max values for automatic uid selection in useradd
Ie daemon/... users are created with usernumbers greater than 200. Eg uuidd has the usernumber 499.
It is intentional, although it seems to be strange. Before, when the static ID limit was 100, this number was 99, therefore it was increased to 199, as the limit was increased to 200. This is old behaviour - different umask for static system ids and different for the others.
TBH, I don't know why it was done that way, it is very old stuff. I tend to close it WONTFIX for RHEL. We are actually discussing exactly same thing in Fedora, in #957852. I want to investigate the reasons behind different behaviour for static and dynamic range of system ids before doing any change there.
(please note that UID_MIN is the border of user ids, not the static ids... this is tracked by SYS_UID_MIN in later Fedora, but not in RHEL-6 afaik.