- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- primary group
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 07:50 PM
12-11-2001 07:50 PM
Is it possible to set on the fly someone's primary group.
For example, the following directories:
rwxrw---- root:groupA dirA
rwxrw---- root:groupB dirB
If user joe has primary group of groupA and secondary group of groupB joe can obviously access both directories.
This is cool.
However, what if joe wants to create files in dirB. They would be created with group permissions of joe's primary group (groupA) and other people in groupB could not read them (umask).
I do not want to change umask.
Scott.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 08:06 PM
12-11-2001 08:06 PM
Re: primary group
Why not use ACLs?
rwxrw---- root:groupA dirA
rwxrw---- root:groupB dirB
For HFS (JFS use setacl),
# chacl '(%.groupA,rw-)(%.groupB,rw-)(%.%,---)' dirB
Refer also to this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8f55a22831ebd5118ff40090279cd0f9,00.html
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2001 08:45 PM
12-11-2001 08:45 PM
SolutionWhat you all need here is switching between groups without changin user id.
The 'newgrp(1)' command helps you to acheive this.
Following is an extract from docs.hp.com
"The newgrp command changes your group ID without changing your user ID and replaces your current
shell with a new one.
If you specify group, the change is successful if group exists and either your user ID is a member of the new group, or
group has a password and you can supply it from the terminal."
Enjoy !
-Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2001 02:53 AM
12-12-2001 02:53 AM
Re: primary group
1. change (You forgot the x-bit for the group)
rwxrwx--- root:groupA dirA
rwxrwx--- root:groupB dirB
to (chmod g+s dir[AB])
rwxrws--- root:groupA dirA
rwxrws--- root:groupB dirB
SGID on a directory:
New files will enherit the group-ownership.
(I don't know if this works on HP-UX, it does in Linux)
2. users can use newgroup to change primary group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2001 02:58 AM
12-12-2001 02:58 AM
Re: primary group
chmod g+s dirA dirB
This way, all users who belong to groupB have access to dirB(as set by the directory permissions) and while accessing dirB, they will use groupB for file creation and modification, even if their primary group is groupA.
And yes, this works on HP-UX.