setting file ownership and mode based on current directory

From: Eric Smith (es_at_fruitcom.com)
Date: 07/27/03


Date: 27 Jul 2003 12:50:38 GMT

What is the best way to set a specific file mode and ownerships
based on where that file is being created in the directory
structure.

For example, suppose we have the hierarchy:
/var/www/test_site

The we would want to have all files created in this dir to
have an ownership of:

web-dev.<some_user>

and say 664 for files
and say 775 for dirs

Thanks

Eric Smith