From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3F015994.2090001@proweb.co.uk> From: matt User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030425 MIME-Version: 1.0 To: 9fans@cse.psu.edu Subject: Re: [9fans] book chapters References: <3F006BC5.4070309@nas.com> In-Reply-To: <3F006BC5.4070309@nas.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 1 Jul 2003 10:51:16 +0100 Topicbox-Message-UUID: e50b836c-eacb-11e9-9e20-41e7f4b1d025 > > Where I have problems with matt's solution breaking down is when you > have worker_5 creating random sets of files in a traditional > hierarchy. Any subfolders he/she/it creates lose the rw permissions > for the bosses group, and even with the sticky bit set for the group > you lose those permissions the next level deep. One of the problems we have is that I (in group wheel or as root) make some file that someone else needs to be able to edit but often I forget all about the permissions and it ends up "-rw-r--r-- matt wheel" leaving the editors unable to edit it. And as they used to phone me at the ungodly hours when I'm likely to be in bed (i.e. pre 10am) I needed a solution here's my inelegant solution from FreeBSD that does kind of the opposite which is an interesting synergie because it uses wait_on which is a program that gives access to the kqueue mentioned in another thread. I don't know how big the queue can get but I have well over 500 files in it across four directory trees #!/usr/local/bin/rc while () { chown -R www:www /www/document_root chmod -R g+w /www/document_root wait_on `{find /www/document_root} sleep 5 } wait_on will return an index to which file has been changed/created for more fine grained control