Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-07-2011, 03:27 AM   #1
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 37
Umask change.

I have logged in with root user
My systems Umask value was 0022.
So i decided to change it to 0077 and observe the system for some time.
so i edited /etc/profile
and added

umask 077
at the end of file

rebooted the machine.

But the umask is still showing as 0022

After the first attempt is failed I tried changing it using
below command.

#umask 077
Validated it.
# umask
rebooted the machine
but the umask is still showing 0022

So at last i have to modify /etc/bashrc file and add umask 077 at the end of the file.

How would i make it in general for all(Even for non-root user) and not just for bash prompt.

What could be the issue?

Last edited by pinga123; 06-07-2011 at 03:41 AM.
Old 06-07-2011, 04:39 AM   #2
Senior Member
Registered: Apr 2007
Location: bbsr,orissa,India
Posts: 1,363

Rep: Reputation: 135Reputation: 135
Changes in /etc/profile will affect the new users to be created. For the created users you have to manually edit their .bashrc file in their home directory.
Old 06-07-2011, 04:43 AM   #3
Registered: Oct 2006
Location: bangalore
Distribution: Fedora, Ubuntu, Debian, Redhat
Posts: 82

Rep: Reputation: 6
You can make change in /etc/bashrc
Old 06-07-2011, 05:46 AM   #4
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 37
Originally Posted by ssrameez View Post
You can make change in /etc/bashrc
but this will only make it specific to bash .
How would i make it in general.
Old 06-07-2011, 08:41 AM   #5
Senior Member
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,300

Rep: Reputation: 102Reputation: 102
I feel for this you need to edit /etc/profile and add "umask 077" which you have already done.
Also, make sure your /etc/bashrc does not have any "umask" entry.

Could you please paste outputs of below commands.
grep -v ^# umask /etc/profile 
grep -v ^# umask /etc/bashrc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change of umask values in Fedora 11 adilkaleem Linux - Security 4 02-04-2010 11:32 PM
[SOLVED] umask change not taking effect mufy AIX 2 01-10-2010 12:39 AM
[SOLVED] umask change not taking effect mufy Linux - Newbie 3 01-10-2010 12:37 AM
change umask of user kernelzack Linux - Software 3 01-07-2010 08:14 PM
How do I change roots umask? 360 Linux - Networking 1 02-19-2002 07:56 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration