From owner-freebsd-questions@FreeBSD.ORG Wed Dec 29 14:44:10 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B644F16A4CE for ; Wed, 29 Dec 2004 14:44:10 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4505A43D58 for ; Wed, 29 Dec 2004 14:44:10 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 19243 invoked from network); 29 Dec 2004 14:44:10 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail3.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Dec 2004 14:44:09 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 2F2FB69; Wed, 29 Dec 2004 09:44:08 -0500 (EST) Sender: lowell@be-well.ilk.org To: Duane Winner References: <41D06DEC.2050605@att.net> From: Lowell Gilbert Date: 29 Dec 2004 09:44:07 -0500 In-Reply-To: <41D06DEC.2050605@att.net> Message-ID: <44is6lyxjc.fsf@be-well.ilk.org> Lines: 52 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@FreeBSD.org Subject: Re: permissions question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 14:44:10 -0000 Duane Winner writes: > I don't know if I am having a brainfart, something is different, or if > I never had it right to begin with: > > I need to have a shared directory for apache web content: > > /usr/local/htmlstuff > > And a group, "htmlguys", and several users will be members of that group. > > I would like to have the root directory set up like this: > > drwxrwxr-x 2 me htmlguys 512 Dec 27 15:06 htmlstuff > > Where "htmlguys" is the owner. > > Any member of htmlguys must be able to read, write and create any file > or folder in htmlstuff, and the group owner of any file or folder in > there must still be set to "htmlguys", so that one group member can > edit another group member's file. They should be able to delete files > and folders that they did not create as well. > > When I ran apache on a Redhat box, I thought I just ran: > > # chmod 2770 on htmlstuff > > and that did the trick for me. Any time a member of htmlguys creates a > new file in there it will be automatically be owned by the user who > created it and the group "htmlguys". > > But that doesn't seem to work on FreeBSD. > > I always referred to that '2' before '770' as the 'sticky bit' for the > group, but I was reading up on setuid, setguid and sticky bits this > morning, and obviously, I had it all wrong. But I know that it "did" > work on Redhat (I still have that server in production, and tested it, > so I know that works). > > So I'm quite confused now, and can't find any documents that describe > how to do what I need. > > Can anybody help me out with this? According to "man chmod", the sticky bit is 1000(oct), not 2000. Try setting it symbolically instead of numerically: # chmod +t htmlstuff -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/