Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-10-2006, 02:55 AM   #1
Registered: Aug 2004
Location: Jaipur(Rajasthan), INDIA
Posts: 35

Rep: Reputation: 15
primary & secondary groups ???


What is the difference between Primary & Secondary groups of users regarding file access permissions. ???

Old 04-10-2006, 03:47 AM   #2
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 165Reputation: 165
Your primary group is the group that gets used when you create files/directories. Any file/directory with a group id that you are a member of (primary or otherwise) you will have access to according to the group permissions.

You can modify the behaviour by setting the group id bit on directories, but that's the simple overview
Old 09-12-2012, 02:09 PM   #3
LQ Newbie
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
Smile primary and secondary group

Your Primary Group is the default group your account is associated when you login, this is the group with the Group ID that is the 4th field in your account /etc/passwd file. Directories and files you create have this Group ID.
Your Seconday Group is any Group(s) you are a member of other than your Primary Group.
All Group(s) are found in the /etc/group file and are created with the 'groupadd' command or any text editor, such as vi/vim.
Users are added to a Group with the 'usermod -G groupname uname' command. You can see the members of a Group by viewing the /etc/group file.
Users can change the current Group they are in with the command 'newgrp' and can check their current group with the 'id' command.
Access to directory/files is controlled by the permission bits of the directory/file and the Group that "owns" the directory/file.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
primary - secondary DNS jsheffie Solaris / OpenSolaris 2 08-01-2005 06:55 AM
redundant qmail servers (primary & secondary) littleking Linux - Networking 3 08-15-2004 10:18 PM
Primary and secondary group trophy Linux - Newbie 2 04-03-2004 12:30 AM
setting up primary HD and secondary HD dataport Linux - General 8 01-23-2004 10:18 PM
Primary and Secondary DNS dilberim82 Linux - Networking 3 07-13-2001 10:50 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:31 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