From owner-freebsd-questions Fri Jul 25 13:01:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA21513 for questions-outgoing; Fri, 25 Jul 1997 13:01:56 -0700 (PDT) Received: from cedb.dpcsys.com (cedb.DPCSYS.com [209.25.4.4]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA21508 for ; Fri, 25 Jul 1997 13:01:49 -0700 (PDT) Received: from localhost (dan@localhost) by cedb.dpcsys.com (8.8.5/8.8.2) with SMTP id UAA06595; Fri, 25 Jul 1997 20:01:29 GMT Date: Fri, 25 Jul 1997 13:01:29 -0700 (PDT) From: Dan Busarow To: "Neil T. Mathison" cc: freebsd-questions@FreeBSD.ORG Subject: Re: Changing file owner automatically on creation. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 25 Jul 1997, Neil T. Mathison wrote: > 1. New files created in the html document directory tree will > become owned by a user named "webadmin" (one or more people > could access this account) > 2. The file's group would be set to the same as it's parent > directory. > 3. The file mode would be set to 775. [ ... ] > Ideally, I would like it happen as soon as the file is created (closed), > as opposed to running some script at a scheduled period. Is there a > way of easily capturing a "file close event" and then kicking off > a script? How are things like this normally accomplished? By having the directory's group be a shared group. i.e. the people who would have acccess to the webadmin account instead are members of group webadmin. The owner remains the original owner. Set the owner's umask to 002 Files will then be created 664 and directories 775 with group set to the shared group and the owner set to the owner. Dan -- Dan Busarow 714 443 4172 DPC Systems / Beach.Net dan@dpcsys.com Dana Point, California 83 09 EF 59 E0 11 89 B4 8D 09 DB FD E1 DD 0C 82