Recording usage without write permission

"Michael F. Stemper" <[email protected]> Mon, 16 Oct 2023 08:44:59 -0500
Newsgroups alt.comp.lang.shell.unix.bourne-bash
Organization A noiseless patient Spider
Message-ID <[email protected]>
Some years back, I was involved in a research project. One of the
outcomes of this was creation of a large data base and various
tools for querying it.

I created a script that set/modified various environment variables,
for inclusion in a user's .profile script. The PI was interested in
who was using this database, so I added a few commands to record
each user's first invocation of the initialization script.

Unfortunately, the only way that I could figure out to do this
involved giving the log file the file permission of the beast (666).

At this point, it's moot, as the PI got his doctorate and moved away,
so the project no longer exists -- nor does my access to that network.

But, I'm curious as to whether there is some way to accomplish the
same thing without giving promiscuous access to a file in my user
space. Maybe some kind of messaging? Send a message to a daemon
executing as me, and have that do the reading and writing? Some
other method?

-- 
Michael F. Stemper
If it isn't running programs and it isn't fusing atoms, it's just bending space.