This is my particular problem: I'm trying to set up git
on a server, for which I'm doing a test on a locally installed apache
on Ubuntu 14.04; for instance, I can do git clone
fine over HTTP, but git push
fails with insufficient permission for adding an object to repository database ./objects
.
Now, in principle, I might have used strace
for debugging this, but this kind of action goes through both git
and apache
, and as such I don't really know which process to strace
. Furthermore, I cannot even tell what user does the end operation try to run as. The only thing that I know for sure is that it is the git repo ./objects
directory which is being accessed, probably with the intent of creating a file there.
So I thought, probably the easiest for me would be if there was a program, that could be set to "listen" to accesses to a directory, and print out/log every such access to say stdout; in example as in this pseudocode:
$ ./traceDirectoryAccess --path /path/to/mygitrepo/objects
Listening for accesses on /path/to/mygitrepo/objects ...
Sat Apr 9 17:53:42 CEST 2016 - pid 1234, user myName (uid 1002) did:
> create file /path/to/mygitrepo/objects/somefile
> result: permission DENIED
...
Is there something like this out there? If there isn't a program per se, maybe there is some kernel facility (e.g. through a file in /sys/kernel/debug/
or similar?)