Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!composer From: composer@bu-cs.BU.EDU (Jeff Kellem) Newsgroups: alt.sources Subject: Re: Need a "watching" program Message-ID: <31061@bu-cs.BU.EDU> Date: 12 May 89 22:06:56 GMT References: <8923@csli.Stanford.EDU> Reply-To: composer@bu-cs.bu.edu (Jeff Kellem) Followup-To: comp.unix.questions Distribution: usa Organization: Boston University Lines: 27 In article <8923@csli.Stanford.EDU> rustcat@csli.stanford.edu (Vallury Prabhakar) writes: > >Hi, > > I was wondering if there is any way of keeping track of any/every body who > looks around in my home directory? 'twould be nice if this program could > create and append to a logfile, each time some user chdir-ed to my $HOME. > > -- Vallury Prabhakar >rustcat@cnc-sun.stanford.edu Well, it is possible to find out if a file has been accessed. Actually, that is relatively easy, using stat() and keeping track of the last access time of a particular file. As far as I know, it is not possible (well, at least, not that easy) to find out who is accessing the file. But, you CAN find out when someone accesses the file. You may miss some of the file accesses, if more than one person accesses the file before you check the access time again. Hope that helps a little bit. -jeff Jeff Kellem INTERNET: composer@bu-cs.bu.edu (or composer%bu-cs.bu.edu@bu-it.bu.edu) UUCP: ...!harvard!bu-cs!composer p.s. This discussion probably does not belong on alt.sources, follow-ups should go to comp.unix.questions, most likely. Thanks.