LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 02:27 AM   #1
pinga123
Member
 
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.
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 02:41 AM.
 
Old 06-07-2011, 03:39 AM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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, 03: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, 04:46 AM   #4
pinga123
Member
 
Registered: Sep 2009
Posts: 684

Original Poster
Blog Entries: 2

Rep: Reputation: 37
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, 07:41 AM   #5
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
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



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 10:32 PM
[SOLVED] umask change not taking effect mufy AIX 2 01-09-2010 11:39 PM
[SOLVED] umask change not taking effect mufy Linux - Newbie 3 01-09-2010 11:37 PM
change umask of user kernelzack Linux - Software 3 01-07-2010 07:14 PM
How do I change roots umask? 360 Linux - Networking 1 02-19-2002 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:42 AM.

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
Open Source Consulting | Domain Registration