Umask and redhat (updated)

Rick Stevens rstevens at vitalstream.com
Fri Jul 16 21:53:35 UTC 2004


Waldher, Travis R wrote:
>  
> 
> 
>>-----Original Message-----
>>From: Waldher, Travis R 
>>Sent: Friday, July 16, 2004 2:38 PM
>>To: Getting started with Red Hat Linux
>>Subject: RE: Umask and redhat
>>
>> 
>>
>>
>>>-----Original Message-----
>>>From: Rick Stevens [mailto:rstevens at vitalstream.com]
>>>Sent: Friday, July 16, 2004 2:06 PM
>>>To: Getting started with Red Hat Linux
>>>Subject: Re: Umask and redhat
>>>
>>>Waldher, Travis R wrote:
>>>
>>>>Where do I go to change the default system umask?
>>>
>>>It's in /etc/bashrc:
>>>
>>>	if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
>>>	    umask 002
>>>	else
>>>	    umask 022
>>>	fi
>>>
>>>Meaning that users that are in their own group and have IDs over 99 
>>>(which is all the mortal users) get a umask of 002, system 
>>
>>users get 
>>
>>>022.
>>
>>When you say users that are in their own group.  You mean I 
>>have an account of travis, my group is also travis?

Yes, that's what it means.

>>We don't use that here.  Would something like this work in it's place?
>>
>>------------------------------------------------
>>if [ `id -u` -gt 99 ]; then
>>        umask 022
>>else
>>        umask 002
>>Fi
>>------------------------------------------------
>>
>>So if my uid is not greater than 99 I get 022, otherwise I get 002?

Yes, that'll work fine.

> 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.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-  Animal testing is futile.  They always get nervous and give the   -
-                             wrong answers                          -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list