I had a request to find a solution for making a log file secure from editing from the user (not root user) running the JBoss instance of an application (Linux environment)
First idea I had is to use the chattr +a
from root user to allow only the appending of new raw in the log file.
But the Log4j file is configured to rotate the file each day and for this reason I suppose that I should repeat the chattr
command for each file created everyday.
I also not sure that the past day file in its "append only" state can be zipped from rotation.
Any suggestion or alternative way to proceed is welcomed.