/etc/bashrc umask


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu /etc/bashrc umask
# 1  
Old 12-09-2008
/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  
Old 12-09-2008
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  
Old 12-09-2008
Tools

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  
Old 12-10-2008
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..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

.bashrc questions

Are there any advantages of doing one over the other in your .bashrc? They both seem to do the same thing. HISTFILESIZE=10000 HISTSIZE=10000export HISTFILESIZE=10000 export HISTSIZE=10000 (4 Replies)
Discussion started by: cokedude
4 Replies

2. Fedora

.bashrc in Ubuntu 14.04

I am getting this: cmccabe@DTV-A5211QLM:~$ cat ~/.bashrc Command 'cat' is available in '/bin/cat' The command could not be located because '/bin' is not included in the PATH environment variable. cat: command not found cmccabe@DTV-A5211QLM:~$ nano .bashrc Command 'nano' is available in... (9 Replies)
Discussion started by: cmccabe
9 Replies

3. UNIX for Advanced & Expert Users

unset .bashrc

Could someone please tell me how to unset your .bashrc? I have tried all of these. I can't find anything useful from google. unset -f .bashrc unset .bashrc (9 Replies)
Discussion started by: cokedude
9 Replies

4. Shell Programming and Scripting

bashrc not saving changes

I am trying to do some changes at bashrc file located at /etc directory of my server. First I tried to edit bashrc via FTP downloaded on my pc changed it and loaded back, but it seems like changes are not reflecting. Therefore I tried to change it via putty shel using vim bashrc command. but... (4 Replies)
Discussion started by: ninadgac
4 Replies

5. Shell Programming and Scripting

.bashrc file

Hi experts, I am using bash shell and I cant find any .bashrc file in my home dir. Can anybody please help me out here.... If .bashrc file is not there, from where my shell config operates? Also I want to set my prompt like... $ Please advice. (5 Replies)
Discussion started by: gentleDean
5 Replies

6. Shell Programming and Scripting

bashrc

i have made a few changes to my bashrc file...have set a few environmental variable that my shell scripts use. Is there any way that these changes can reflect in evryone else's bashrc who are in the network or do all of them have to copy those changes to their own bashrc file. (2 Replies)
Discussion started by: lassimanji
2 Replies

7. Shell Programming and Scripting

how do i look for my .bashrc file

hi i am using cygwin and would like to modify my .bashrc file. How can search to find where it is? I have looked at multiple bashrc file in /etc but none of them seemed to work..thanks (12 Replies)
Discussion started by: npatwardhan
12 Replies

8. UNIX for Dummies Questions & Answers

.bashrc revisisted

hey guys, i've tried countless times to do this and have come up with: find / type -f ".bashrc" -exec grep PS1 '{}' \; 2>/dev/null | ls -l which tells bash: find all the files in the system with the name .bashrc and look for modifcations to PS1 and terminate and rediret error msgs... (8 Replies)
Discussion started by: oxoxo
8 Replies

9. UNIX for Dummies Questions & Answers

.bashrc question

Hi, I was instructed to find all the .bashrc files on my system, that MODIFY the PS1 varaible. here is what i've come up with so far: ls / .bashrc -print woo. But thats not all. I need to display the full file name ( Including the full path ) and protection. - I can display... (4 Replies)
Discussion started by: oxoxo
4 Replies

10. Shell Programming and Scripting

from bashrc to sh..??

:) as soon as i installed my software a couple of weeks ago.. (fedora core 2 vs, 2.6.8-1.521) i decided to switch the shell to sh shell and i know that .bashrc is the bash profile file(???) i want to use the sh version of the same file and make it the main profile file.. how can I switch it and... (3 Replies)
Discussion started by: moxxx68
3 Replies
Login or Register to Ask a Question