Bug 11416 - /etc/profile changes umask and environment
/etc/profile changes umask and environment
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: setup (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-15 06:09 EDT by Kjetil T. Homme
Modified: 2014-03-16 22:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-05-15 06:09:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kjetil T. Homme 2000-05-15 06:09:46 EDT
Our users typically set up their environment and umask once,
and let all subprocesses of their session manager inherit those
values.  This is foiled by /etc/profile, which unconditionally
sets the umask.  Please put this check in the /etc/skel files
instead.

The scripts also muck with the environment variables.  It would
be good if you used the idiom
   VAR=${VAR:-"value"}
to avoid stomping on the environment already set up.
Comment 1 Bill Nottingham 2000-06-10 19:14:26 EDT
Overriding system default variables (such as umask)
works fine for me here by editing $HOME/.bashrc, etc.
Comment 2 Kjetil T. Homme 2000-06-11 03:11:37 EDT
We use a generalized but relatively expensive (~.5sec) method for setting up the
environment, and therefore make sure that the environment is set up only once. 
We've done it this way for ten years on other Unixen, so your workaround simply
isn't an option here.

I think this is more a matter of principle, though:  System policy like this
should not be put in /etc/profile.  Put it in /etc/skel or perhaps
/etc/profile.d/policy*, to make it easier to override.
Comment 3 David Balažic 2001-07-05 07:08:07 EDT
Put your settings in ~/.bash_profile.
They are set only once ( at login ) and they are inherited by all subprocesses.

Note You need to log in before you can comment on or make changes to this bug.