Path: utzoo!attcan!utgpu!watmath!att!dptg!rutgers!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.wizards Subject: Re: How do I detect who and when A file gets accessed ? Message-ID: <3322@solo10.cs.vu.nl> Date: 21 Sep 89 17:02:48 GMT References: Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 15 nieh@nnn.crd.ge.com writes: \I have an ASCII file which is owned by me. I constantly update the file. \Some of my colleagues will aceess (read-only) this file regularly. \How do I detect who and when the file gets accessed ? \It is a very primitive bulletin board. I don't want to build programs \to manage this file. One simple program is enough. You let it register the user before accessing the file. In order to make it impossible to bypass the program, you make it setuid and you chmod 600 the ASCII file. One problem: to prevent race conditions when updating the user register, you have to use some locking mechanism. -- creat(2) shouldn't have been create(2): |Maarten Litmaath @ VU Amsterdam: it shouldn't have existed at all. |maart@cs.vu.nl, mcvax!botter!maart