LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 36
Umask change.


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

Code:
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.

Code:
#umask 077
Validated it.
Code:
# umask
0077
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
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
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
ssrameez
Member
 
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
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Quote:
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
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

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.
Code:
grep -v ^# umask /etc/profile 
grep -v ^# umask /etc/bashrc
 
  


Reply


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


All times are GMT -5. The time now is 10:24 PM.

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