How do I detect who and when A file gets accessed ?
Maarten Litmaath
maart at cs.vu.nl
Fri Sep 22 03:02:48 AEST 1989
nieh at 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 at cs.vu.nl, mcvax!botter!maart
More information about the Comp.unix.wizards
mailing list