From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 16 13:43:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 149D316A41F for ; Tue, 16 Aug 2005 13:43:21 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95A4643D45 for ; Tue, 16 Aug 2005 13:43:20 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from sinanica.bg.datamax (sinanica.bg.datamax [192.168.10.1]) by jengal.datamax.bg (Postfix) with QMQP id 6EB8787CD; Tue, 16 Aug 2005 16:43:19 +0300 (EEST) Received: (nullmailer pid 30085 invoked by uid 1004); Tue, 16 Aug 2005 13:43:16 -0000 Date: Tue, 16 Aug 2005 16:43:16 +0300 From: Vasil Dimov To: Joost Bekkers , Dmitry Agaphonov , freebsd-hackers@freebsd.org Message-ID: <20050816134316.GA29915@sinanica.bg.datamax> References: <20050816165115.2387c14f@rzhe.agava-dubna.local> <20050816131034.GA44545@bps.jodocus.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <20050816131034.GA44545@bps.jodocus.org> X-OS: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.10i Cc: Subject: Re: Shared memory permissions question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2005 13:43:21 -0000 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 16, 2005 at 03:10:34PM +0200, Joost Bekkers wrote: > On Tue, Aug 16, 2005 at 04:51:15PM +0400, Dmitry Agaphonov wrote: > > Hello, > >=20 > >=20 > > I have user A from group G creating shared memory M with permissions > > 0060. After this, A fails to attach M due to permission denied. > > However, another user B from the same group G successfully attaches M. > > User A manages to attach only if permissions 0600 added for M. > >=20 > > Why the system disregards group permissions for user A? Is it correct > > behaviour? > >=20 > > This is happening on FreeBSD 4.11-STABLE. > >=20 >=20 > This is normal&correct behaviour. >=20 > Access if granted on a best match basis: >=20 > if user=3D=3Downer then only user rights are applied > elseif user is member of group then only group rights are applied > else only 'other' rights are applied. >=20 This also applies for the filesystem. $ id uid=3D1001(dd) gid=3D1001(dd) groups=3D1001(dd) $ ls -l file ----r--r-- 1 dd dd 0 Aug 16 16:34 file $ cat file cat: file: Permission denied $ --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFDAe1zFw6SP/bBpCARAvjpAKCytkie+ODFExYBeE1EWM1VxqQCjQCg4OfM ngiqF0I1nfzNghiNlXllguI= =fKKX -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI--