The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Ubuntu
.
google unix.com



Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Having trouble with .bashrc oxoxo UNIX for Dummies Questions & Answers 5 10-24-2008 04:08 PM
sourcing the .bashrc Nusy UNIX for Dummies Questions & Answers 3 05-27-2008 06:23 PM
alias rm = 'rm -i' in .bashrc and vnc cy163 UNIX for Dummies Questions & Answers 0 05-23-2007 10:57 AM
history -c in my .bashrc yankee428 UNIX for Dummies Questions & Answers 1 06-23-2005 05:13 PM
from bashrc to sh..?? moxxx68 Shell Programming and Scripting 3 09-13-2004 06:39 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-09-2008
itik itik is offline
Registered User
  
 

Join Date: Oct 2007
Location: Toronto, Ontario
Posts: 354
/etc/bashrc umask

Hi,

I got this redhat ent 4 assigned to me now.

/etc/bashrc

if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
umask 022
else
umask 077
fi

What does it mean?

I created already three user and it never had 022 umask, always 077.

Thank you in advance.
  #2 (permalink)  
Old 12-09-2008
itik itik is offline
Registered User
  
 

Join Date: Oct 2007
Location: Toronto, Ontario
Posts: 354
One more thing

How can I find a file with a umask of 022? What kind of command should I do?

Or this is not possible.

Thanks.
  #3 (permalink)  
Old 12-09-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Cool

umask sets the default file creation mask.
So, 022 would mean no write access for group or others (everyone).

A 077 would mean no read or write or execute access for group and others.

To find files the result of this... possible by an awk with selection criteria, but not sure if fool-proof, and what it would give you as meaningful output. (The files did not have to be the result of this umask, could be that way anyway.)
  #4 (permalink)  
Old 12-10-2008
itik itik is offline
Registered User
  
 

Join Date: Oct 2007
Location: Toronto, Ontario
Posts: 354
I figure this out myself, if user and group are the same and userid is greater than 99 then it will use umask 022...

which most of the system userid have the same user name and group name but less than 99 on the userid, so they are not included.

The only one I've seen on my user list is the nfsnobody with the same name and group and the userid is 4294967294. So this is intended for this user.

But how does nfsnobody login to the server? And I don't think that nfs services is ON on my system.

Any idea? Or maybe it's nfs and umask need to be 022. Able to read by others.


Thanks.

Last edited by itik; 12-10-2008 at 06:14 AM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0