From owner-freebsd-questions Fri Jul 25 11:03:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA16058 for questions-outgoing; Fri, 25 Jul 1997 11:03:06 -0700 (PDT) Received: from buffnet4.buffnet.net (buffnet4.buffnet.net [205.246.19.13]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA16052 for ; Fri, 25 Jul 1997 11:03:03 -0700 (PDT) Received: from buffnet11.buffnet.net (shovey@buffnet11.buffnet.net [205.246.19.55]) by buffnet4.buffnet.net (8.7.5/8.7.3) with SMTP id OAA10906; Fri, 25 Jul 1997 14:03:12 -0400 (EDT) Date: Fri, 25 Jul 1997 14:03:12 -0400 (EDT) From: Steve Hovey 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 I think one normally configs the web server to look in peoples home dirs with their own perms so that URLs are then http://whereever/~userid On Fri, 25 Jul 1997, Neil T. Mathison wrote: > > Greetings, > > I would like to automatically change a file's owner and group along > with it permission bits. When a user creates a file within a certain > directory tree, I have a need to chown that file to another owner and > group. Moreover, I need to alter it's permissions. > > > I need someway of executing something like this scenario: > > 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. > > User's will primarily be using ftp clients to upload the documents, > logged in through there own accounts. (user: whatever, group: user). > > 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? > > Thanks in advance. > > Neil > >