LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 12-19-2008, 03:34 AM   #31
mashcaster
Member
 
Registered: Dec 2008
Posts: 67

Original Poster
Rep: Reputation: 15

I ran for following after su'ing into root:

grep -i "umask" /etc/*

and

grep -i "umask" ~/.*

and found that there were umask entries in the following files

/etc/profile
~/.bashrc

I changed the umask entry in /etc/profile from 022 to 077 and commented out the umask entry in ~/.bashrc

Because of the current bug, I added

umask 002

to /etc/gdm/Xsession

After restarted the system, I logged in as a standard user, created a file, checked the permissions and the permissions are set to

-rw-rw-r--

What have I missed out?
 
Old 12-19-2008, 03:45 AM   #32
mashcaster
Member
 
Registered: Dec 2008
Posts: 67

Original Poster
Rep: Reputation: 15
Nevermind, got it working by changing 002 to 077 in /etc/gdm/Xsession.
 
Old 12-19-2008, 09:45 AM   #33
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
Quote:
Originally Posted by mashcaster View Post
<snip>...
umask 002

to /etc/gdm/Xsession

After restarted the system, I logged in as a standard user, created a file, checked the permissions and the permissions are set to

-rw-rw-r--

What have I missed out?
umask 002 = 664 (files) = rw-rw-r--

For what you described umask should be 077 *everywhere* including the /etc/profile, /etc/login.defs, /etc/skel/.bashrc, /root/.bashrc, /etc/gdm/Xsession, etc. The less programs that can weasel around the umask the better. Someone else mentioned /etc/adduser.conf DIR MODE and it should be 700. etc... anywhere you can find to set it... set it.

Quote:
Nevermind, got it working by changing 002 to 077 in /etc/gdm/Xsession.
There ya go

Last edited by rweaver; 12-19-2008 at 09:52 AM.
 
Old 12-19-2008, 09:58 AM   #34
mashcaster
Member
 
Registered: Dec 2008
Posts: 67

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rweaver View Post
umask 002 = 664 (files) = rw-rw-r--

For what you described umask should be 077 *everywhere* including the /etc/profile, /etc/login.defs, /etc/skel/.bashrc, /root/.bashrc, /etc/gdm/Xsession, etc. The less programs that can weasel around the umask the better. Someone else mentioned /etc/adduser.conf DIR MODE and it should be 700. etc... anywhere you can find to set it... set it.



There ya go
How do I scan all the files in my harddrive to find all umask's

grep -i "umask" /etc/*

will only look in the folder /etc/

and

grep -i "umask" ~/.*

will only look into my home folder.

Last edited by mashcaster; 12-19-2008 at 10:03 AM.
 
Old 12-19-2008, 12:22 PM   #35
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
Quote:
Originally Posted by mashcaster View Post
How do I scan all the files in my harddrive to find all umask's

grep -i "umask" /etc/*

will only look in the folder /etc/

and

grep -i "umask" ~/.*

will only look into my home folder.
You don't really need to look in the whole system, but looking through the sub directories of /etc wouldn't hurt... try:

Code:
grep -iRI "umask" /etc/* | grep -v "/etc/rc[0-9S].d"
(i case insensitive, R recursive, I ignore binary) (v invert match)

Most of the /etc/rcX.d stuff can be safely ignored also.

Last edited by rweaver; 12-19-2008 at 12:31 PM. Reason: added rcX.d removal to cmdline
 
  


Reply

Tags
chmod, exec, find, permissions, umask


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
user accounts rmorgan Linux - Server 0 10-31-2006 11:40 AM
LXer: Linux 101: Manage user accounts in a multi-user Linux environment ... LXer Syndicated Linux News 0 06-27-2006 08:03 AM
User Accounts Verbal Kint Linux - Security 12 06-18-2005 01:11 AM
User Accounts Kemik Linux - Newbie 13 01-12-2005 05:24 PM
User Accounts kaplan71 Linux - General 1 07-08-2004 02:19 PM


All times are GMT -5. The time now is 11:01 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration