Is there a way to find out which process is writing to a file on a server with restricted permissions?

Let’s say I have a file named "app.log" and I want to find out which process is writing the log, but I have restricted permissions, I have tried the following:

  1. lsof /path/to/file, which I dont’ have this package and don’t have the permission to install it.
  2. loggedfs -l /path/to/log_file -c /path/to/config.xml /path/to/directory tail -f /path/to/log_file, same as the first one, don’t have the permission to install this package.
  3. auditctl -w /path/to/file, have this package but missing root permissions to run it.

what would be an alternative way to find out which process is writing the log to a file?

I’m looking for alternative ways because I’m working in an old production environment with some restricting and weird privileges.

Asked By: Ilgar

||

Luckily, what you’re trying to do is by principle a rather privileged operation: you’re trying to look into other user’s (UNIX meaning of the word "user") processes.

So, there’s no alternative way, clean or not, to do that without the privileges you need. You’ll have to ask someone who has the privileges to do so.

Answered By: Marcus Müller
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.