<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: primary group in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629942#M40871</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Why not use ACLs?&lt;BR /&gt;&lt;BR /&gt;rwxrw---- root:groupA dirA &lt;BR /&gt;rwxrw---- root:groupB dirB &lt;BR /&gt;&lt;BR /&gt;For HFS (JFS use setacl), &lt;BR /&gt;# chacl '(%.groupA,rw-)(%.groupB,rw-)(%.%,---)' dirB&lt;BR /&gt;&lt;BR /&gt;Refer also to this thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8f55a22831ebd5118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8f55a22831ebd5118ff40090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong&lt;BR /&gt;Brainbench MVP for Unix Admin&lt;BR /&gt;&lt;A href="http://www.brainbench.com" target="_blank"&gt;http://www.brainbench.com&lt;/A&gt;</description>
    <pubDate>Wed, 12 Dec 2001 04:06:18 GMT</pubDate>
    <dc:creator>Steven Sim Kok Leong</dc:creator>
    <dc:date>2001-12-12T04:06:18Z</dc:date>
    <item>
      <title>primary group</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629941#M40870</link>
      <description>I have a question relating to a person's primary group.&lt;BR /&gt;&lt;BR /&gt;Is it possible to set on the fly someone's primary group.&lt;BR /&gt;&lt;BR /&gt;For example, the following directories:&lt;BR /&gt;&lt;BR /&gt;rwxrw---- root:groupA dirA&lt;BR /&gt;rwxrw---- root:groupB dirB&lt;BR /&gt;&lt;BR /&gt;If user joe has primary group of groupA and secondary group of groupB joe can obviously access both directories. &lt;BR /&gt;&lt;BR /&gt;This is cool.&lt;BR /&gt;&lt;BR /&gt;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). &lt;BR /&gt;&lt;BR /&gt;I do not want to change umask.&lt;BR /&gt;&lt;BR /&gt;Scott.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Dec 2001 03:50:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629941#M40870</guid>
      <dc:creator>Scott Van Kalken</dc:creator>
      <dc:date>2001-12-12T03:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: primary group</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629942#M40871</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Why not use ACLs?&lt;BR /&gt;&lt;BR /&gt;rwxrw---- root:groupA dirA &lt;BR /&gt;rwxrw---- root:groupB dirB &lt;BR /&gt;&lt;BR /&gt;For HFS (JFS use setacl), &lt;BR /&gt;# chacl '(%.groupA,rw-)(%.groupB,rw-)(%.%,---)' dirB&lt;BR /&gt;&lt;BR /&gt;Refer also to this thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8f55a22831ebd5118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8f55a22831ebd5118ff40090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong&lt;BR /&gt;Brainbench MVP for Unix Admin&lt;BR /&gt;&lt;A href="http://www.brainbench.com" target="_blank"&gt;http://www.brainbench.com&lt;/A&gt;</description>
      <pubDate>Wed, 12 Dec 2001 04:06:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629942#M40871</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2001-12-12T04:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: primary group</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629943#M40872</link>
      <description>Scott: &lt;BR /&gt;&lt;BR /&gt; What you all need here is switching between groups without changin user id. &lt;BR /&gt;&lt;BR /&gt;The 'newgrp(1)' command helps you to acheive this. &lt;BR /&gt;&lt;BR /&gt;Following is an extract from docs.hp.com&lt;BR /&gt;&lt;BR /&gt;"The newgrp command changes your group ID without changing your user ID and replaces your current&lt;BR /&gt;shell with a new one.&lt;BR /&gt;&lt;BR /&gt;If you specify group, the change is successful if group exists and either your user ID is a member of the new group, or&lt;BR /&gt;group has a password and you can supply it from the terminal."&lt;BR /&gt;&lt;BR /&gt;Enjoy !&lt;BR /&gt;&lt;BR /&gt;-Madhu&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Dec 2001 04:45:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629943#M40872</guid>
      <dc:creator>Madhu Sudhan_1</dc:creator>
      <dc:date>2001-12-12T04:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: primary group</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629944#M40873</link>
      <description>You have (at least) two choices&lt;BR /&gt;&lt;BR /&gt;1. change (You forgot the x-bit for the group)&lt;BR /&gt;rwxrwx--- root:groupA dirA&lt;BR /&gt;rwxrwx--- root:groupB dirB&lt;BR /&gt;to (chmod g+s dir[AB])&lt;BR /&gt;rwxrws--- root:groupA dirA&lt;BR /&gt;rwxrws--- root:groupB dirB&lt;BR /&gt;&lt;BR /&gt;SGID on a directory:&lt;BR /&gt;New files will enherit the group-ownership.&lt;BR /&gt;(I don't know if this works on HP-UX, it does in Linux)&lt;BR /&gt;&lt;BR /&gt;2. users can use newgroup to change primary group.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Dec 2001 10:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629944#M40873</guid>
      <dc:creator>CPHVF-U Guard</dc:creator>
      <dc:date>2001-12-12T10:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: primary group</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629945#M40874</link>
      <description>Scott, if you want that all new files in dirA get groupA and all files in dirB get groupB, the best way is to set the correct group on the directory itself and set the SGID bit on them :&lt;BR /&gt;chmod g+s dirA dirB&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;And yes, this works on HP-UX.</description>
      <pubDate>Wed, 12 Dec 2001 10:58:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/primary-group/m-p/2629945#M40874</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2001-12-12T10:58:41Z</dc:date>
    </item>
  </channel>
</rss>

