Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 1997 13:39:20 -0400 (EDT)
From:      "Neil T. Mathison" <mathison@sara.cpb.org>
To:        freebsd-questions@freebsd.org
Subject:   Changing file owner automatically on creation.
Message-ID:  <Pine.OSF.3.95.970725111356.12223A-100000@sara.cpb.org>
In-Reply-To: <Pine.GSO.3.96.970725093757.363A-100000@james.freenet.hamilton.on.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.95.970725111356.12223A-100000>