Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-09-2004, 10:20 AM   #1
LQ Newbie
Registered: Jan 2004
Posts: 1

Rep: Reputation: 0
Every file I create has a group different than root. How do I find out where this is

Every file I create is created with a group that is not root. I would like all files being created to have root as the group. Where is this set? I am logged on as root.
Old 04-09-2004, 11:42 AM   #2
Registered: Apr 2004
Location: Brisbane Australia
Distribution: UBUNTU 13.04
Posts: 61

Rep: Reputation: 19
Every new file or directory that you create will have some set of default permissions assigned to it. You can set what these permissions will be with the umask command.
You can read about umask in your bash manual then place the relevent umask= line in the hidden .bashrc file.

All Linux users have a user ID and a group ID. Change your group ID back to root (gid=root)

BTW I wouldn't be logged in as root for long not knowing what I was doing.

Hope this helps,
Larry Keenan
Old 04-09-2004, 02:28 PM   #3
Registered: Feb 2004
Location: Waimanalo, HI
Distribution: Slackware 10, Fedora 6
Posts: 308

Rep: Reputation: 30
Users are assigned to groups by entries in the file /etc/passwd. The first line of my passwd file is "root:x:0:0::/root:/bin/bash". The first "0" is root's user id, and the second "0" is root's group id. The name of group 0 is given in the file /etc/group, which on my system has the line "root::0:root", where the first "root" is the name assigned to the group whose id is "0". So check out these two files on your system to make sure that root is assigned to group 0 and the name of group 0 is "root".

Last edited by GregLee; 04-09-2004 at 02:29 PM.
Old 04-16-2004, 07:04 AM   #4
LQ Newbie
Registered: Apr 2004
Location: Mesa AZ
Posts: 1

Rep: Reputation: 0
umask sets read/write/execute permissions for user/group/other. It masks the permissions if defined in your profile if undefined unix default permisions are 666 (rw-rw-rw-) a umask of 022. changes the defaults to (rw-r--r--)

here's the simplistic math:
rwx=7 octally (base 8=111) read,write,execute
rw=6 octally 110 (notice last digit is 0 or off = no execute)
rx=5 octally 101
r=4 octally 100
wx=3 octally 011
w=2 octally 010
x=1 octally 001 (execute only)
000 no joy..never seen this but could happen...

so if we look at unix defaults and convert to octal:

default 666 = rw-rw-rw-
umask 022 = -0 -2 -2 (standard umask on base os install)
final result 644 = rw-r--r-- changes group and everyone else to read only

umask has nothing to do with group id (gid membership)..only file read/write/execute permissions only..

GregLee is correct...but I noticed your a "newbie" and I thought it value added to clarify how umask is used...I hope it helps.
Old 04-16-2004, 10:28 AM   #5
Registered: Apr 2004
Location: Brisbane Australia
Distribution: UBUNTU 13.04
Posts: 61

Rep: Reputation: 19
Thanks - Well Explained.

Larry Keenan


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
growisofs only can create file under DVD root directory? bravehao Linux - Newbie 1 10-17-2005 01:02 PM
File owner and File group locked - root deiphage Linux - Hardware 5 02-05-2005 02:30 PM
why can't i create new group luxpops Programming 10 09-11-2004 05:15 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 05:01 PM
cannot find the root file manager in Mdk 10 scottsteibel Mandriva 1 05-31-2004 08:02 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:44 AM.

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