Umask and redhat (updated)

Rick Stevens rstevens at vitalstream.com
Fri Jul 16 22:42:33 UTC 2004


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? :-)
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-      Cuteness can be overcome through sufficient bastardry         -
-                                         --Mark 'Kamikaze' Hughes   -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list