Date: 29 Dec 2004 09:44:07 -0500 From: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> To: Duane Winner <dwinner-lists@att.net> Cc: freebsd-questions@FreeBSD.org Subject: Re: permissions question Message-ID: <44is6lyxjc.fsf@be-well.ilk.org> In-Reply-To: <41D06DEC.2050605@att.net> References: <41D06DEC.2050605@att.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Duane Winner <dwinner-lists@att.net> 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44is6lyxjc.fsf>