From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Cutts Newsgroups: gmane.os.tru64.managers Subject: group ownership of files doesn't seem to be working quite correctly on 5.1B? Date: Mon, 15 Jan 2007 14:08:32 +0000 Message-ID: <2845E0E9-077D-41FB-9AC9-9E4506DBFC3A@sanger.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168888823 30806 80.91.229.12 (15 Jan 2007 19:20:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2007 19:20:23 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Mon Jan 15 20:20:19 2007 Return-path: Envelope-to: gotm-tru64-unix-managers@gmane.org Original-Received: from sws1.ornl.gov ([160.91.1.101]) by lo.gmane.org with smtp (Exim 4.50) id 1H6W15-00081j-V5 for gotm-tru64-unix-managers@gmane.org; Mon, 15 Jan 2007 18:53:08 +0100 Original-Received: (qmail 31633 invoked by uid 49509); 15 Jan 2007 14:08:49 -0000 Original-Sender: tru64-unix-managers-owner@ornl.gov Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 31623 invoked by uid 49501); 15 Jan 2007 14:08:49 -0000 Original-Received: from 160.91.4.119 by sws1 (envelope-from , uid 49491) with qmail-scanner-1.25 (clamdscan: 0.83/743. spamassassin: 3.0.2. Clear:RC:0(160.91.4.119):SA:0(-2.5/5.0):. Processed in 0.398141 secs); 15 Jan 2007 14:08:49 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 Original-Received: from emroute1.ornl.gov (160.91.4.119) by sws1.ornl.gov with SMTP; 15 Jan 2007 14:08:49 -0000 Original-Received: from emroute1.ornl.gov ([127.0.0.1]) by emroute1.ornl.gov (PMDF V6.3-x3 #31246) with ESMTP id <0JBW0097AXYON5@emroute1.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 15 Jan 2007 09:08:49 -0500 (EST) Original-Received: from CONVERSION-DAEMON.emroute1.ornl.gov by emroute1.ornl.gov (PMDF V6.3-x3 #31246) id <0JBW00B01XYORR@emroute1.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 15 Jan 2007 09:08:48 -0500 (EST) Original-Received: from VIRUSCAN-DAEMON.emroute1.ornl.gov by emroute1.ornl.gov (PMDF V6.3-x3 #31246) id <0JBW00B02XYBQM@emroute1.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 15 Jan 2007 09:08:48 -0500 (EST) Original-Received: from smtp.sanger.ac.uk (smtp.sanger.ac.uk [193.62.203.215]) by emroute1.ornl.gov (PMDF V6.3-x3 #31246) with ESMTP id <0JBW00A6SXYA0U@emroute1.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 15 Jan 2007 09:08:35 -0500 (EST) Original-Received: from ssh.sanger.ac.uk ([193.62.203.55] helo=[127.0.0.1]) by intmail1b.internal.sanger.ac.uk with esmtp (Exim 4.41) id 1H6SVl-000592-N3 for tru64-unix-managers@ornl.gov; Mon, 15 Jan 2007 14:08:33 +0000 Original-To: tru64-unix-managers@ornl.gov X-Envelope-from: tjrc@sanger.ac.uk X-Mailer: Apple Mail (2.752.2) X-Spam-Virus: No X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on email.ornl.gov X-Spam-Level: X-Qmail-Scanner-MOVED-X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_05, BOTNET_SERVERWORDS,SPF_PASS autolearn=ham version=3.1.7 Xref: news.gmane.org gmane.os.tru64.managers:9105 Archived-At: In fact, group ownership of newly created files doesn't seem to work at all. I can't believe it's taken me 5 years to notice this one... Changing a shell's group does not seem to affect the ownership of new files created once the group has been changed: 13:57:11 tjrc@pcs3g:/tmp$ id uid=10787(tjrc) gid=10(staff) groups=0(system),706(ssg),558(intweb), 555(w3adm),102(informatics) 13:57:16 tjrc@pcs3g:/tmp$ ls -l foo ls: foo not found 13:57:37 tjrc@pcs3g:/tmp$ newgrp ssg 13:57:43 tjrc@pcs3g:~$ cd /tmp 13:57:45 tjrc@pcs3g:/tmp$ id uid=10787(tjrc) gid=706(ssg) groups=0(system),706(ssg),558(intweb),555 (w3adm),102(informatics) So the gid has changed correctly, but 13:57:51 tjrc@pcs3g:/tmp$ /bin/touch foo 13:57:58 tjrc@pcs3g:/tmp$ ls -l foo -rw-r--r-- 1 tjrc system 0 Jan 15 13:57 foo 13:58:00 tjrc@pcs3g:/tmp$ Not only has it not created the file with the group ownership that's my primary group, or the group to which I have changed, but it seems to have chosen the first group of which I am a member (0). Now, only the system group is actually in the /etc/group file, the others are all NIS groups. I thought it might be the case that newgrp(1) only works with groups which are present in the /etc/group file, so I edited the group file to make a local copy of the ssg group, and the issue persists. I'm aware of the historical bug that affected people with groups split over multiple lines in /etc/group, but that isn't the case here. But then I went back ignoring newgrp at all, just checked what ownership my files are being created with, and lo, it's "system" not my primary group of "staff". What?! Does anyone know what's going on? Is this some strange configuration option of AdvFS that we've got wrong? It seems likely it's actually at the filesystem level, since the problem also affects Linux NFS clients, iff the file server is running Tru64. Can anyone help me out here? Tim