From owner-freebsd-current@FreeBSD.ORG Sat Nov 17 17:28:19 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5974E8CB; Sat, 17 Nov 2012 17:28:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id AC2F98FC0C; Sat, 17 Nov 2012 17:28:18 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hj6so2313090wib.13 for ; Sat, 17 Nov 2012 09:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=gVtefwDZ5lkRo2pf063DHOcFJCX1JFOdoN6x4sfiuW4=; b=wvQtaisOaY8qiUcs9bgORWkaRhX05nClpcpTI75Nojkpy64l4OzXxDG2XbRvuenDtY H/DwDWt+lgVKq9v08pCwBtQkuktYIyuSQ50vA6jjtp0XlkkA7UkqQauQ/sh+erBvEG2q kRaOrFCKp3B823kOc0LwkmFlbmBuRyuJ/fr+exwcPZh0JFa1WcBVOpEonH0FmX7FVYlr komkdYxeSa2RHF84lUJEy1qLQvZdVAZgHwY3rWyhseS4kQu7O/JKT4lYyXstPFmzuiFu TiwnkdFMrUJ4A7ysxmyQJZpgnMXxypR7vWSM7aOubkWQwADwnwoOjQfsska5dN2Ylg/s ctzQ== Received: by 10.216.139.209 with SMTP id c59mr3179262wej.50.1353173297553; Sat, 17 Nov 2012 09:28:17 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id j18sm5793374wiv.9.2012.11.17.09.28.16 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Nov 2012 09:28:16 -0800 (PST) Date: Sat, 17 Nov 2012 18:28:08 +0100 From: Mateusz Guzik To: Ryan Stone Subject: Re: pw keeps setting /etc/group to 0600 Message-ID: <20121117172808.GA8699@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Ryan Stone , FreeBSD Current , bapt@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: bapt@freebsd.org, FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2012 17:28:19 -0000 On Sat, Nov 17, 2012 at 11:20:21AM -0500, Ryan Stone wrote: > Wow. So apparently things are even more broken than I though. Let's play, > "What group am I in?" > > root@group-testing:/usr/home/rstone # cd /tmp > root@group-testing:/tmp # pw groupadd testing > root@group-testing:/tmp # mkdir testdir > root@group-testing:/tmp # chown root:testing testdir/ > root@group-testing:/tmp # chmod g+rwx testdir/ > root@group-testing:/tmp # pw usermod > root@group-testing:/tmp # pw groupmod testing -m rstone > root@group-testing:/tmp # id rstone > uid=1001(rstone) gid=1001(rstone) groups=1001(rstone),0(wheel),1002(testing) > root@group-testing:/tmp # exit > $ id > uid=1001(rstone) gid=1001 groups=1001,0 > $ id rstone > uid=1001(rstone) gid=1001 groups=1001 > $ touch /tmp/testdir/testfile > touch: /tmp/testdir/testfile: Permission denied > $ ls -ld /tmp/testdir/ > drwxrwxr-x 2 root 1002 512 Nov 17 11:07 /tmp/testdir/ > This is not a bug and I think it always was this way. The process you used to su/sudo/whatever to root was not in testing group and didn't magically enter it after you added rstone user to that group. You have to log in again or do stuff like exec su - rstone. -- Mateusz Guzik