Umask and redhat (updated)
Waldher, Travis R
Travis.R.Waldher at boeing.com
Tue Jul 20 19:05:04 UTC 2004
> -----Original Message-----
> From: Rick Stevens [mailto:rstevens at vitalstream.com]
> Sent: Friday, July 16, 2004 3:43 PM
> To: Getting started with Red Hat Linux
> Subject: Re: Umask and redhat (updated)
>
> Waldher, Travis R wrote:
> >
> >
> >
> >>-----Original Message-----
> >>From: Rick Stevens [mailto:rstevens at vitalstream.com]
> >>Sent: Friday, July 16, 2004 2:54 PM
> >>To: Getting started with Red Hat Linux
> >>Subject: Re: Umask and redhat (updated)
> >>
> >>
> >>>What if your shell is chsrc, or something other than bash.
> >>
> >>Will this
> >>
> >>>be set for them as well?
> >>
> >>For csh users, the lines are virtually identical in /etc/csh.cshrc.
> >
> >
> > Ok, so basically there is no true global setting, I need to
> set it for
> > each type of shell?
>
> Yes, unfortunately. This is due to the way the shells start
> up. bash starts up by reading, in order, /etc/profile,
> /etc/bashrc, and ~/.bashrc among others. csh starts by
> reading /etc/csh.cshrc, /etc/csh.login, and ~/.[t]cshrc and a
> host of others.
>
> This is all due to the various permutations of Unix out there
> (Linux being just one more), and not all of which behave the same.
>
> HISTORY LESSON: The first Unix shell was called, aptly
> enough, "sh" and was written by a chap named Bourne. It's
> more correctly called the "Bourne Shell". "bash" is an
> enhanced version of the Bourne shell, named the "Bourne Again
> Shell" (cute, eh?).
>
> If you've ever wondered why all the system admin scripts are
> written for the Bourne or bash shells, the Unix standards
> state that the only shell you're guaranteed to have on a
> system is some variation of Bourne. You are also guaranteed
> to have some other programs such as sed, ls, awk, grep, ls,
> rm, mv, mount and cp. If you've ever wondered why those are
> in /bin (on the root filesystem), now you know--you can be
> sure that the root filesystem is mounted by the boot loader
> when your admin script is run.
>
> You aren't guaranteed of anything else at this early stage of
> your boot process. csh, ksh, tsh and the rest may or may not
> be installed or on filesystems that aren't mounted yet. If
> your script absolutely MUST work (e.g. to boot the system
> up), you must write it for Bourne/bash.
>
> Ok, RECESS TIME! Who's up for a game of softball? :-)
Ok.. So I tried making the changes, and nothing took effect, until I
added some files to my home directory. Which tells me that at least ES
3.0 is reading files in the following order:
/etc/profile
/home/travis/.bash_profile
/home/travis/.bashrc
/etc/bashrc
If .bash_profile doesn't exist under my home account, the .bashrc script
won't run, the .bashrc script calls /etc/bashrc.
The question becomes, short putting this entry in the /etc/profile file,
how can I ensure umask is always run, even if there isn't any startup
scripts in the users home directory?
Thanks,
Travis
More information about the Redhat-install-list
mailing list