/etc/bashrc change causes umask to not be set for login shells in Red Hat Enterprise Linux 5

Solution Verified - Updated -

Issue

/etc/bashrc change causes umask to not be set.

Curstomers relying on this initial statement in /etc/bashrc (from setup-2.5.58-7.el5 or earlier) to set the umask may experience changes with setup-2.5.58-9.el5 provided by RHEL 5.8.

if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
    umask 002
else
    umask 022
fi

The above code was moved into a test later in the /etc/bashrc script to only execute if the the shell is not a login-shell. This was done as part of http://rhn.redhat.com/errata/RHBA-2012-0198.html in reaction to BZ# 608987, to ensure that /etc/bashrc does not over-ride any settings made in /etc/profile and /etc/profile.d/*.sh scripts.

Environment

Red Hat Enterprise Linux (RHEL)5
setup-2.5.58-9.el5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.