<?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: change group id in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622392#M236145</link>
    <description>Ok Simon, thanks.</description>
    <pubDate>Fri, 09 Sep 2005 05:40:12 GMT</pubDate>
    <dc:creator>A.G.M. Velthof</dc:creator>
    <dc:date>2005-09-09T05:40:12Z</dc:date>
    <item>
      <title>change group id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622385#M236138</link>
      <description>Hello to All,&lt;BR /&gt;&lt;BR /&gt;I have to change a group id because of a nfs link, and I was testing some things.&lt;BR /&gt;The files belonging to the group change to the new group id, so that works fine.&lt;BR /&gt;There is something, I think strange, hapening with the tar files.&lt;BR /&gt;I make a tar with files belonging to group id, say 102. I change the group id to 120. After that the files in the tar also have group id 120.&lt;BR /&gt;Can someone explain this?&lt;BR /&gt;&lt;BR /&gt;Regards, Alfons</description>
      <pubDate>Fri, 09 Sep 2005 03:57:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622385#M236138</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2005-09-09T03:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: change group id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622386#M236139</link>
      <description>You are saying that if you chgrp a tar file to a different group id then this cascades to all the files contained WITHIN the tar file?  This is not right.&lt;BR /&gt;&lt;BR /&gt;I suspect that you are extracting the tar file whilst logged in as a user with GID 120, and since the user is not a "root" user it can only create files owned by itself.&lt;BR /&gt;&lt;BR /&gt;To see the true GID of files in a tar file, preview it with: -&lt;BR /&gt;&lt;BR /&gt;tar tvf file.tar&lt;BR /&gt;&lt;BR /&gt;This will show you the real UID/GID's of the files.  However ONLY root can extract the files correctly with the UID/GID of the files within.&lt;BR /&gt;&lt;BR /&gt;You mention also NFS - remember that by default when root mounts filesystems over NFS, it actually has the permissions of the user "nobody" and NOT root, therefore has no special privileges.&lt;BR /&gt;&lt;BR /&gt;If you require to do this over NFS you must export the filesystem with the norootsquash option, such that root is really root when mounted remotely.&lt;BR /&gt;&lt;BR /&gt;Be VERY careful with this though as it can be dangerously insecure.  When you export like this make sure you limit it to specific hosts and not *, otherwise anyone can get root access to your files quite easily.</description>
      <pubDate>Fri, 09 Sep 2005 04:04:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622386#M236139</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-09-09T04:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: change group id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622387#M236140</link>
      <description>Hi Alfons&lt;BR /&gt;&lt;BR /&gt;tar seems to archive the names of users and groups....but if you do a tar -tvf .. , it converts from names back to ids....&lt;BR /&gt;But stop!&lt;BR /&gt;That can't be. Because if you extract a tar from a foreign system and you do not have all the accounts on your system, the files will belong to UID/GID instead of names.&lt;BR /&gt;So I think, that tar archives the names as well as the IDs and tries to convert it, if there is a chance for it....&lt;BR /&gt;&lt;BR /&gt;Micky</description>
      <pubDate>Fri, 09 Sep 2005 04:08:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622387#M236140</guid>
      <dc:creator>Micky_1</dc:creator>
      <dc:date>2005-09-09T04:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: change group id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622388#M236141</link>
      <description>Hello Simon,&lt;BR /&gt;&lt;BR /&gt;I am logged in as root, and created the file as root. So the file is owned by root:sys&lt;BR /&gt;The files inside the tar however are assigned to group id 102. &lt;BR /&gt;After changing the group id 102 into 120 al the files inside the tar get group id 120.&lt;BR /&gt;&lt;BR /&gt;By the way, I am not using nfs as root user.&lt;BR /&gt;&lt;BR /&gt;Reagards, Alfons</description>
      <pubDate>Fri, 09 Sep 2005 04:12:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622388#M236141</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2005-09-09T04:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: change group id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622389#M236142</link>
      <description>I'm struggling to understand exactly what is happening, and what you are doing.  Perhaps if you attached a transcript of what you are doing, including the commands you run (tar, chgrp etc) as well as output from tar tvf etc, then we can see exactly what your symptoms are.</description>
      <pubDate>Fri, 09 Sep 2005 04:14:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622389#M236142</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-09-09T04:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: change group id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622390#M236143</link>
      <description>in the directory /data I have 20 files:&lt;BR /&gt;-rw-r----- 1 moq mtusers 1053 1.dat&lt;BR /&gt;-rw-r----- 1 moq mtusers 1053 2.dat &lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;The user id of moq is 204.&lt;BR /&gt;The group id of mtusers is 102.&lt;BR /&gt;&lt;BR /&gt;I create the tarfile as user root:&lt;BR /&gt;tar cvf all.tar *dat.&lt;BR /&gt;&lt;BR /&gt;After that I look in the tar file:&lt;BR /&gt;tar tvf all.tar&lt;BR /&gt;and see the following:&lt;BR /&gt;rw-r----- 204/102 1053 1.dat&lt;BR /&gt;rw-r----- 204/102 1053 2.dat&lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;With sam I change the goup id of mtusers to 120.&lt;BR /&gt;&lt;BR /&gt;When i look in the tar file with &lt;BR /&gt;tar tvf all.tar, I see:&lt;BR /&gt;rw-r----- 204/120 1053 1.dat&lt;BR /&gt;rw-r----- 204/120 1053 2.dat&lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;So the group id in the tar file is changed as well.&lt;BR /&gt;&lt;BR /&gt;Regards, Alfons</description>
      <pubDate>Fri, 09 Sep 2005 04:29:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622390#M236143</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2005-09-09T04:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: change group id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622391#M236144</link>
      <description>OK, now I see.&lt;BR /&gt;&lt;BR /&gt;In the POSIX format of a tar archive (the default in HPUX now), the user and group are actually stored as a string, not a numberic.  You can see this if you execute: -&lt;BR /&gt;&lt;BR /&gt;strings file.tar | more&lt;BR /&gt;&lt;BR /&gt;You will see the word "mtusers" embedded within the file.&lt;BR /&gt;&lt;BR /&gt;Therefore when you perform tar tvf, the command is reverse looking mtusers and discovering the new GID.&lt;BR /&gt;&lt;BR /&gt;If you want pre-POSIX format, then you can use the O option with tar.&lt;BR /&gt;&lt;BR /&gt;See the difference: -&lt;BR /&gt;&lt;BR /&gt;tar cvf file1.tar *.dat&lt;BR /&gt;tar cvOf file2.dat *.dat&lt;BR /&gt;&lt;BR /&gt;Run them both through "strings" and see the difference.&lt;BR /&gt;&lt;BR /&gt;See the man page for tar for the options N and O for more details.&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Sep 2005 04:48:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622391#M236144</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-09-09T04:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: change group id</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622392#M236145</link>
      <description>Ok Simon, thanks.</description>
      <pubDate>Fri, 09 Sep 2005 05:40:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-group-id/m-p/3622392#M236145</guid>
      <dc:creator>A.G.M. Velthof</dc:creator>
      <dc:date>2005-09-09T05:40:12Z</dc:date>
    </item>
  </channel>
</rss>

