Bug 11416 - /etc/profile changes umask and environment
Summary: /etc/profile changes umask and environment
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: setup
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-05-15 10:09 UTC by Kjetil T. Homme
Modified: 2014-03-17 02:13 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-05-15 10:09:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Kjetil T. Homme 2000-05-15 10:09:46 UTC
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 23:14:26 UTC
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 07:11:37 UTC
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 11:08:07 UTC
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.