From owner-freebsd-questions@FreeBSD.ORG Mon May 4 15:01:06 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19F041065677 for ; Mon, 4 May 2009 15:01:06 +0000 (UTC) (envelope-from a.pirko@inode.at) Received: from mx.inode.at (mx06.lb01.inode.at [62.99.145.6]) by mx1.freebsd.org (Postfix) with ESMTP id CE6108FC14 for ; Mon, 4 May 2009 15:01:05 +0000 (UTC) (envelope-from a.pirko@inode.at) Received: from [84.119.8.155] (port=13439 helo=fz-nbook.local) by smartmx-06.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1M0zfD-0004T7-6Q; Mon, 04 May 2009 17:01:03 +0200 Date: Mon, 4 May 2009 17:00:49 +0200 From: Armin Pirkovitsch To: freebsd-questions@freebsd.org Message-ID: <20090504165342inode@frozen-zone.org> References: <49FEFAA1.4030503@insipidity.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49FEFAA1.4030503@insipidity.co.uk> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: Shaun Friedle Subject: Re: Groups problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Armin Pirkovitsch List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 15:01:06 -0000 Have you relogged in after adding the user to the group file? (su -l should do the trick as well if you can't log out/relog in for some reason) Otherwise you'll get exactly the behaviour you described below. Armin On Mon 04 May 2009, Shaun Friedle wrote: > Hi, > I seem to have a weird problem with groups, it seems like the system > doesn't notice that I am in certain groups when it comes to file > permissions, and if I run groups or id with no arguments it also has > some groups missing from the list, but with my username as an argument > it is complete. I've never encountered this before, does anyone know > what the problem might be? > > [shaun@strange] ~ $ ls -lh /tmp/group_test > -rw-rw-r-- 1 www mercurial 0B 4 May 14:08 /tmp/group_test > [shaun@strange] ~ $ echo test > /tmp/group_test > bash: /tmp/group_test: Permission denied > [shaun@strange] ~ $ whoami > shaun > [shaun@strange] ~ $ grep shaun /etc/group > wheel:*:0:root,shaun > www:*:80:shaun > shaun:*:1002: > svn:*:1004:svn,shaun > mercurial:*:1006:shaun,www > [shaun@strange] ~ $ groups > shaun wheel svn > [shaun@strange] ~ $ groups shaun > shaun wheel www svn mercurial > [shaun@strange] ~ $ id > uid=1002(shaun) gid=1002(shaun) groups=1002(shaun),0(wheel),1004(svn) > [shaun@strange] ~ $ id shaun > uid=1002(shaun) gid=1002(shaun) > groups=1002(shaun),0(wheel),80(www),1004(svn),1006(mercurial) -- Armin Pirkovitsch a.pirko@inode.at