From owner-freebsd-questions@FreeBSD.ORG Thu Mar 3 00:54:43 2011 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 15B19106564A for ; Thu, 3 Mar 2011 00:54:43 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 9F1168FC17 for ; Thu, 3 Mar 2011 00:54:42 +0000 (UTC) Received: by wwb31 with SMTP id 31so809447wwb.31 for ; Wed, 02 Mar 2011 16:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=xMOS7uUhFivQkd1cuanPsU/SE5uokV2/x/u3OR2j78E=; b=hr7VmfHQuJW/q1uomk6qSaZT20wijVCtQwJ0nKmA1xVxVzRPKv0no/qESrYXd6X0SD Fg4H9+KyYbbwueEzvjbpUqakYhwC7i1ruAmIhmU4QGq5k0BML/wYvvRB1Az2KopCSRBA Q275eWb5NKGy1XPiYwQCdhC997teqpV+8PluI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=reFzEQOsjs29wP7exhsJ+vn8Ym9Q9D1zea1cdsHyY3+pjrE1Rr+ULKGzNd6pkXl/3W H6kD+b3/v3q/A0yJ1FyWNM1hzTcfFsWsq9JElnQFR0ePberfvQUOqA9iAlNswH1Pb5/s nIurMeLO7C/TX6SMb6byVNwiTZ60F99MhpUh8= MIME-Version: 1.0 Received: by 10.216.39.196 with SMTP id d46mr277553web.114.1299113681465; Wed, 02 Mar 2011 16:54:41 -0800 (PST) Received: by 10.216.25.72 with HTTP; Wed, 2 Mar 2011 16:54:41 -0800 (PST) In-Reply-To: <4D6ECA01.40002@gmail.com> References: <4D6ECA01.40002@gmail.com> Date: Wed, 2 Mar 2011 18:54:41 -0600 Message-ID: From: Brandon Gooch To: David Demelier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: Question about nethack and setgid X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2011 00:54:43 -0000 On Wed, Mar 2, 2011 at 4:51 PM, David Demelier w= rote: > Hello, > > I don't understand how nethack can store the score in > /usr/local/lib/nethack/logfile. > > the real binary is here /usr/local/lib/nethack/nethack > > And the mode is > > -rwxr-sr-x =A01 games =A0games =A01793635 25 Jan 2011 > /usr/local/lib/nethack/nethack > > So that means people in games group will run nethack as games user (owner= of > file) but I'm not in games group ! and I can save the file located in > > /usr/local/lib/nethack/logfile which mode is -rw-rw-r-- =A0games =A0games > > I'm writing a game that will store file too, because I can't make it work= s > like nethack I was planning using the setuid mode but I don't like much t= his > .. > > What am I misunderstanding? > > Cheers, > > -- > David Demelier Take a look at: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/permissions.html#= AEN4027 I believe that it will demystify the behavior you're seeing. -Brandon