Results 1 to 6 of 6
I get different value of umask for root and a normal user???
For root:
Code:
umask
0022
for normal user
Code:
umask
0002...
- 05-24-2009 #1
umask haivng different value
I get different value of umask for root and a normal user???
For root:for normal userCode:umask 0022
Code:umask 0002
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-24-2009 #2Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
If you use bash, you can look into the ~/.bashrc and ~/.bash_profile files for each user, or into /etc/profile. Maybe there's a umask there.
If you use other shell check the man page for your shell of choice to know what the initialization files for this shell are.
- 05-24-2009 #3
is there a way to search the contents of the above file without looking into each one of them as I am not sure it may b in which file.
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-24-2009 #4Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
You can always use grep.
Code:grep umask /etc/* #or grep umask ~/.*
- 05-24-2009 #5
I think it's the default value of umask for user
I created a new user just to check out the umask value for the same . The o/p obtained is
so I suppose that the umask for normal user is 0002 and for root is 0022Code:umask 0002
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 05-29-2009 #6
It makes perfect sense
Yes it makes perfect sense .
Code:root umask 0022 File 666-0022= 644= -rw- r-- r-- Dir 777-0022=755= -rwx -r-x r-x
The only difference the umask for normal user make is in the 2nd column and it makes perfect sense( again) coz root doesn't have any group where as a normal user can have a group which may need to access and modify the same resource( ie. w)Code:Normal User File 666-0002=664= -rw -rw -r-- Dir 777-0002=775= -rwx -rwx r-x
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu


Reply With Quote